Rejection of society and worldly things, and withdrawal from them both has been a rather common practice in religions for millennia. Religious hermits and ascetics, and moralists escaping or otherwise rejecting corrupt society are a pretty regular staple of religions the world over.
Superheroes could be a seen to be a kind of echo of that, in so far as they are usually pretty moralistic and extreme in their world-rejection and escapism, if you prefer to view it that way.
Something of that speaks to their fans, who are also greatly dissatisfied with the world, yet usually don't have what it takes to escape, so they escape vicariously -- through their movies, comics, and books where live heroes that can.