Not an economist but I don't see how money can be anything other than an accounting tool at that level. If they had "paid for it" back in the day, young people would still be screwed.
The two big ways to increase prosperity that I see are for people to take care of their health so they need fewer medical services, and for fewer people to be devoted to administration (e.g. the medical billing quagmire, SaaS companies focused on how to better extract rent) or convincing people to buy stupid crap (c.f. the giant advertising industry that swallows up bright workers to build a surveillance and propaganda apparatus instead of e.g. industrial automation), fewer pointless wars, and more people devoted to actually doing things people need or building infrastructure (e.g. solar).
The problem isn't that there are old people, is that there's currently a glut of old people, which puts real strain on the system. Being old is expensive for governments. Not only do older people not typically pay nearly as much in taxes, they also require more resources to support.
So many of today's problems come down to the simple demographic fact: there's a lot of baby boomers, and they're getting old.