Days after the Illinois Supreme Court rejected an overhaul aimed at shoring up the state’s troubled pension system, Chicago, the state’s largest city, saw its credit rating downgraded two levels to junk status on Tuesday by Moody’s Investors Service. The move could mean higher borrowing costs for Chicago, which is wrestling with an underfunded pension system of its own. The State Supreme Court opinion, issued last week, barred the state from lowering pension benefits for public employees under a provision of the Illinois Constitution, but it also raised doubts about the legality of changes Chicago has made to two of its pension funds. Mayor Rahm Emanuel criticized Moody’s downgrade as premature. “While Chicago’s financial crisis is very real and at our doorsteps, today’s irresponsible decision by Moody’s to downgrade the city’s credit by two steps goes far beyond that reality,” Mr. Emanuel said.