It's called bankruptcy!
When a business, government, etc files bankruptcy they can and often do go back and renegotiate contracts of all sorts including retirement. It is totally legal and is expected to happen within a reorganization or full out bankruptcy.
It is sad, however whether you have run a business or a government, mismanagement has consequences. At one time I was responsible for 3 stores in the Detroit area. I often shook my head with the people being voted into office by the citizens of the city.
Now we could increase everyone's taxes to help out Detroit or California for that matter.