"And Darkness and Decay and the Red Death held illimitable dominion over all" (14). That's quite a last line, isn't it? The take-home message is "death conquers all." At the beginning of the story, the Red Death was all over Prospero's kingdom, but Prospero himself fled and created a place that was supposedly safe from death. Life, especially of the drunken and debauched variety, could continue there without fear. Prospero's holdout was life's last holdout. By the story's end, death has penetrated Prospero's holdout and completely destroyed it, and now holds "illimitable dominion." In other words, death's rule has no boundaries. It has conquered all.
You can easily see the ending as warning against foolishness. It does drive home how foolish Prospero and his pals were to think they could escape from death. Death is inevitable; their attempt was bound to fail from the beginning. Perhaps they even got what they deserved for that nasty trick Prospero pulled of abandoning his people when they needed him most. On another level, if you see Prospero as an artistic genius figure, the ending might send the message that all the artist's attempts to create a perfect, controlled "artificial" world of art are doomed by human mortality, just like the artist himself is.
In addition to what we say above about the message of the ending, it's also useful to remember that Poe's main goal in writing was to create an effect in the reader in the form of an intense emotion or experience. He often chose the themes of his works not for their own sake, but because he thought they were best suited to creating the effect he desired. (source). And if Poe's aim in this story was to unnerve his readers and fill us with dread, what better way to end than with "Darkness and Decay" and Death conquering all?