In his last moments of lucidity, David tells Lucy that he wasn't able to fulfill his mother's dream, nor Maine's dream, but she can fulfill her dream.
Falco and Lucy escape, and David faces down Adam, and loses.
Cyberpunks always die or go psycho, so this is the good end.
The final scene is Lucy on the moon for real. She sees David there with her, as he was when they shared the VR moon experience.