What, you want to ascribe value to learning itself? But it's so hard to measure! Simpler then to ignore it and use lifetime wages as the only relevant measure.
Moral of the story, unless you are born wealthy you have to make your own luck.
There isn't much to say to respond to that, apart that it seems to me that, in a parallel universe, you might have had a more fulfilling experience, or you might have cut your losses and walked away sooner.
That's the cruel aspect of the PhD. It really seems like a lot of important things are outside of one's control, especially when it comes to important factors in mental health. Nobody's starting a PhD with the goal of sinking hours into Reddit and Buffy because they feel awful about their PhD experience.