Was David truly freed at the end?
Falling is an easy way to wake up from a dream, but since the drunken scene where he lied on the street with the mask (or even sooner) he's had zero control and all of the characters in the story were purely mouthpieces of his mind.
It's possible David exists 150 years later but it's also possible they shot him or dreaming for an escape was just one of his many dreams.