The bigger issue is that even if the pension funds go under or just underperform, the government entity is liable for paying the pension costs, unless (as in the case of San Diego) some malfeasance or fraud can be proven as the basis for increasing pension benefits.
So if CALPERS has a bad year in terms of earnings, the state General Fund makes up the difference in the actual cost of funding pensions for beneficiaries. At least for the state government, payments to retirees are protected in the state constitution so these costs are a must pay, like debt service, and cannot be cut from the state budget. The only way to reduce state pension costs is to promise new employees less, it is an entitlement to existing retirees as well as those making their way through the system now.
And I don’t see state court judges (who are essentially state employees) allowing those benefits to be taken away.