Everyone, it seems, wants a piece of New York City public housing.

Advocates for homeless people are demanding more apartments for families living in shelters. School officials want space in public housing for new prekindergarten classes. Mayor Bill de Blasio wants to use open land in the projects for new affordable housing.

And just over a quarter of a million households sit on the waiting list for an apartment in one of the New York City Housing Authority’s 334 developments.

But the demands on Nycha, as the housing authority is known, clash with a grave financial reality. After years of shrinking government investment in public housing, the agency has a $77 million budget deficit this year and unfunded capital needs totaling $18 billion, its officials say.

Shola Olatoye, the housing authority’s chairwoman, said the huge shortfalls had pushed public housing into a “pretty dire” phase, leaving the authority unable to meet many of its day-to-day obligations, like timely repairs, and most of its long-term capital needs.