The theme of "The Masque of the Red Death" is that no one, no matter how powerful or how rich, escapes death. The theme is shown through the actions of the characters and through irony, as death is extremely democratic and egalitarian. Death essentially is the great equalizer.
The story is about a wealthy prince, Prince Prospero, and his privileged friends who lock themselves away in the prince’s ornate palace to dance and make merry as they wait for the plague to pass through their village so that it will once again be safe for them to return to the outside world. Meanwhile, the people outside the castle are struggling. They live in close quarters where the plague spreads easily. They also do not have access to the wealth, food, and privileges that Prince Prospero and his friends take for granted.
Yet, the prince and his circle never for a moment consider helping the less fortunate people in the outside world in any way. They think only of themselves and their indulgences. They believe themselves to be above everyone else and, most importantly in terms of the theme of the story, above the eponymous Red Death, or the plague. Yet, they are as susceptible as the poor people who live in the village outside the palace are. They face the same death that the villagers face, despite their scornful disregard of human life and misery just a short distance away.
Thus, the underlying theme of the story that illustrates their inability to escape the democratic forces of the Red Death also shows another important theme of the story: their lack of compassion and empathy for others also ends up working against them. Although we do not know how many of the villagers survive the Red Death, not one person within the palace survives. Perhaps, had they been more willing to extend help to the less fortunate, they might also have had an opportunity to access whatever herbs or medicines that some of the villagers might have used to save themselves.