It’s not just Social Security and Medicare which are underfunded. State governments have vastly underfunded public pensions. Here is the abstract to a new NBER paper, The Intergenerational Transfer of Public Pension Promises by Novy-Marx and Rauh.
The value of pension promises already made by US state governments will
grow to approximately $7.9 trillion in 15 years. We study investment
strategies of state pension plans and estimate the distribution of
future funding outcomes. We conservatively predict a 50% chance of
aggregate underfunding greater than $750 billion and a 25% chance of at
least $1.75 trillion (in 2005 dollars). Adjusting for risk, the true
intergenerational transfer is substantially larger. Insuring both
taxpayers against funding deficits and plan participants against
benefit reductions would cost almost $2 trillion today, even though
governments portray state pensions as almost fully funded.