Judges and other top officials are challenging the widespread belief that public pensions are untouchable when they cause financial distress.