Mayor Michael R. Bloomberg has promised all sorts of assistance to ease Bill de Blasio’s transition, but the mayor has nonetheless bequeathed one particularly thorny, potentially explosive issue to his successor: New York City’s 300,000 municipal workers are angry that their contracts expired years ago, and they are demanding more than $7 billion in retroactive pay to make up for their years without a regular raise.

It could prove devilishly difficult for Mr. de Blasio — long a favorite of the city’s unions — to deliver even a small part of what labor leaders are demanding because the city faces an anticipated $2 billion deficit next year. This poses a quandary for Mr. de Blasio, fiscal experts say — if he gives billions in retroactive pay to the unions, that means he might have to cut spending on schools, the police or parks, or face a harder time financing his cherished plans for universal prekindergarten.

When Mr. Bloomberg was pushing for low — or no — wage increases in union negotiations several years ago, labor leaders walked away from the bargaining, convinced that they would get a better deal from whoever was elected the next mayor. But now it appears that the union chiefs may have miscalculated, because after years without a contract, they are asking Mr. de Blasio for a large amount of retroactive wage increases that he simply may not be able to pay.

“The municipal unions made a decision that they would rather wait for the next mayor than try to resolve their contracts with Mayor Bloomberg,” said Carol Kellermann, president of the Citizens Budget Commission, a business-backed fiscal watchdog. “O.K., now they have their new mayor. They’re asking him for a lot of money, no matter how you slice it, but nobody thinks that amount of money is available.”