I don't think it is clear at all that this is inevitable.
(It certainly seems likely that they will be underfunded; why not pay for services with promises that someone else has to fulfill)
Add to that fact that in the US, taxpayer funded pensions have NO rules (they're specifically exempt from laws regarding defined benefit pension funding), it's quite easy to see politicians giving away deferred benefits to government worker unions in exchange for votes today. The only person this affects (future taxpayers in 20 to 30 years), are mostly not at the table. And not enough people pay attention to local elections or understand the numbers enough to stop this.
That's contradicted by the spending facts of the last several decades.
The US invests more per pupil when it comes to primary and secondary education, than any other nations except for Switzerland, Luxembourg, Norway, and Austria. So there's the US - 330 million people - competing with hyper rich, tiny, Luxembourg - 600k people - on education spending per pupil.
Our teachers are also among the best paid in the world.
We've dramatically over-invested into classical education. Far too many people have run up immense student loan debts, when they should have acquired a trade skill instead at a small fraction of the cost.
Germany is the model that the US should be following, rather than just blindly spending more on a traditional education path (which is not working out well).
https://www.theatlantic.com/business/archive/2014/10/why-ger...
http://blogs.edweek.org/edweek/global_learning/2017/05/the_u...
Three blocks away from my house, 30% of 6th graders are at reading level.