From coast to coast, booming American cities and suburbs are looking for ways to preserve homes for an increasingly cash-strapped middle class.

California’s governor wants to fund housing for families whose moderate income puts them beyond the scope of current assistance programs. Similar efforts are underway in Boston and Philadelphia. And in Washington, Mayor Muriel E. Bowser (D) has proposed spending $20 million to spur development of homes for families earning up to $141,000 a year.

But as public officials expand their affordable-housing initiatives to encompass the less needy, they are confronting a question: When it comes to the income of those who deserve a government handout, how high is too high?

The new investments in middle-income homes — sometimes called “workforce housing” and often marketed as help for public employees such as police officers, teachers and firefighters — reflect an undeniable reality of urban life in the 21st century: Even college-educated workers in decently paid professions are having trouble making ends meet.

But critics of the new focus on affordable housing for the middle class say it risks diverting scarce resources from those with little or no income, including people who live in decrepit public housing conditions or on the street.

Opponents say the initiatives also carry an unmistakable whiff of political showmanship, aiming to appease a sector of the population that votes at higher rates and is often viewed more sympathetically than those living in poverty or homelessness.

“The American narrative around poverty, which is that people bring it on themselves, is harder to force on this sacrosanct group which people call the middle class,” said Michael Anderson, director of the Housing Trust Fund Project at the nonprofit Center for Community Change.

Anderson said he has watched with trepidation as local governments, many of them struggling with rampant homelessness, have embraced the idea of diverting taxpayer dollars to housing for people with six-figure incomes.

“I think it would be a perilous mistake at this time in our history to have a focus shift upward on the income level when we still haven’t met the very clear and basic need of those at the very lowest,” he said.

Such tensions are acute in the District. A rising population and booming real estate development have brought trendy restaurants and luxury apartment buildings to neighborhoods that were once refuges for those with modest incomes.

The city has seen rapid displacement of longtime residents — the National Community Reinvestment Coalition recently determined that the District has experienced the most intense gentrification of any U.S. city — and persistent homelessness. The impending arrival of Amazon’s second headquarters across the Potomac River in Arlington is expected to further drive up D.C. rents and home prices in the coming years.

Although Bowser has devoted substantial sums to creating or preserving affordable housing for those at the bottom of the income ladder, some advocates say her investments are insufficient, given the scope of the problem.

An analysis last year by the D.C. Fiscal Policy Institute, a left-leaning think tank, found that less than a third of rental units produced by D.C. housing programs are accessible to those making under 30 percent of area median income, despite the fact that most households struggling to afford their rent fall into that category. Most of the affordable units are going to those making 50 or 60 percent of area median income, the institute found.

The mayor’s proposed budget for the coming fiscal year does not set aside any new funding for upkeep to public housing, despite an estimated $340 million backlog in repairs for immediate health and safety hazards.

Bowser’s proposed $20 million workforce fund would help create affordable homes for people making between 60 and 120 percent of the District’s median income — roughly $70,000 to $141,000 for a family of four.

“I do think we have to think about how we help middle-income folks, but I’m not sure that this is the right program,” said D.C. Council member Elissa Silverman (I-At Large). She said some money in the workforce fund could be put to better use on public housing renovations, and that the remaining dollars should be aimed at helping those making between 60 and 80 percent of area median income.

Bowser administration officials say the mayor’s new emphasis on middle-income housing does not come at the expense of existing programs: The mayor has proposed increasing annual funding for the Housing Production Trust Fund, which caters to low-income residents, to $130 million from the current $100 million. She also wants to add $5 million to an existing $10 million fund for preserving subsidized units.

“We are really, I think, investing heavily at that low income” level, said Polly Donaldson, director of the D.C. Department of Housing and Community Development. “There’s not housing stock being specifically built at that middle level, and that is really a need that the mayor wanted to address.”

At a recent roundtable discussion, the mayor said city workers often voice frustration that they’re excluded from government programs designed to help those who earn less money.

“Oftentimes what we hear from our employees is, ‘Well, where’s the affordable housing for us?’ ” Bowser said. “ ‘We don’t qualify for, you know, a whole host of programs that the District offers because we have a good-paying job. But we are still struggling to make ends meet, quite frankly, for housing, transportation, child care, you name it.’ ”

That sentiment resonates with some of the middle-class workers the new fund aims to help.

Yolanda Geter, who earns just over $75,000 per year as an emergency services dispatcher for the D.C. government, is in the process of buying a home in Northeast Washington’s Deanwood neighborhood. But she said she could afford the $419,000 purchase price only with the help of first-time home buyer programs for city employees and is anticipating cutting back on basic living expenses such as cable and phone plans.

She said middle-class status — at least in high-cost cities — doesn’t mean what it once did.

“Most people, on paper, it appears that they can afford things that in fact they really can’t because of the cost of living in this area,” Geter said. “I guess they would call it middle class. But once you pay your bills, there’s not a whole lot left.”

Madra Harden, a 35-year-old preschool teacher for D.C. Public Schools who earns a salary of about $72,000, said the city’s high home prices drove her and her husband to move to Maryland when they began having children several years ago.

The median home price in the District was $570,000 in 2018, according to Bright MLS.

“I’ve found that when you have small kids, it goes quickly,” Harden said. “I’m from Arkansas, and the cost of living is just so much cheaper than here.”

Experts say the shortage of affordable urban homes for the middle class has been aggravated in recent years as developers have focused on pricey condos and luxury apartments and turned away from the kind of modest houses and low-rise apartment buildings that have historically been the starter homes of middle-income workers.

“A lot of that’s just gone away,” said Christopher Ptomey, executive director at the Terwilliger Center for Housing at the Urban Land Institute. “Most of the development over the last decade has been focused on the luxury end.”

Federal housing programs, meanwhile, offer generous tax credits and other incentives for the development of low-income housing. That has left some local government officials seeking to shore up what they say is a gap in the middle of the market.

“If you’re a two-person household — somebody’s making $40,000, somebody’s making $35,000, y’all got a bunch of kids — you can’t find a place to live in Boston,” said Chrystal Kornegay, executive director of the Massachusetts Housing Finance Agency, which over the past several years has spent or committed more than $70 million for housing for those making 61 to 120 percent of area median income. “It’s a shame that the market can’t figure out how to serve them, but what does that mean?”

The Philadelphia Redevelopment Authority announced in February that it was expanding an incentive program for middle-income housing. Last month, California Gov. Gavin Newsom (D) included $200 million for middle-class homes in a $750 million package of proposals to address the state’s affordable-housing crisis.

Such proposals have not been welcomed in all quarters.

Matt Schwartz, president and chief executive of the California Housing Partnership, said a recent analysis by the nonprofit group showed that 76 percent of extremely low-income households in the state pay more than half their income toward housing costs, compared with 4 percent of moderate-income households.

Diverting money from low-income housing to help the middle class “is a bad policy choice,” Schwartz said. “It may be good politics because you have a lot of voters that are struggling to afford the homes they want in the moderate-income category. But those people have choices, generally.”

In the District, that skepticism is shared even by some of the middle-income workers the mayor says she wants to help.

Nathan Luecking, a social worker at Anacostia High School, said he and his wife — who have a combined income of about $160,000 — recently bought a $490,000 home in Northeast Washington. With a no-interest loan available to D.C. employees and other grants from the city and his union, the purchase penciled out.

By contrast, he said, some of the students he counsels live in public housing complexes that are “absolutely uninhabitable — and I’m not even exaggerating.” Although middle-class workers like himself don’t always have it easy, he said, they shouldn’t be a top priority for the mayor.

“It’s like your ceiling’s caved in, and there’s water pouring into your house,” Luecking said. “And she’s saying, ‘Hey, look, I fixed this lock down in the basement.’ ”

Jonathan O’Connell contributed to this report.