As more and more shopping centers close so goes their tax dollars. In response, the taxes on middle class housing continues to skyrocket.  More and more developers are building tiny ugly depression era apartment buildings with low ceilings and tiny living rooms. This is the new American prosperity.

QUEEN CREEK, Ariz.—For years, this growing suburb of Phoenix had been anticipating the development of an open-air mall on 500 acres, a project that promised to be the main commercial center—and tax generator—on the town’s southern end.

Since the project was approved in 2006, however, the retrenchment of brick-and-mortar stores nationally and the rise of online shopping have led executives at developer WDP Partners LLC to conclude they no longer want to build a mall in Queen Creek. Instead, they want to sell the land as 1,100 home sites.

“You build what there is demand for,” WDP partner Jack Rasor said. “You need rooftops to justify the retail, so that has to happen first.”

The shift, if approved, would represent not just a loss of revenue. It would also be a potential strain on the town’s finances and composition.

Queen Creek and municipalities in many Western states—including Arizona, Colorado, Oklahoma and New Mexico—try to keep property taxes low by using sales-tax revenue generated by stores to provide much of their municipal budget for city services. Homes, by contrast, generate costs by way of the city services that must be provided to them, such as police protection and road maintenance. If a city dependent on sales tax allows too much residential development at the expense of commercial development, it risks running up its costs and restricting its revenue.

“It’s our responsibility to ensure that we have a balance between residential and commercial,” Queen Creek Vice Mayor Dawn Oliphant said. “If we build all of these homes, we have to consider the infrastructure requirements and public safety” costs.

In Queen Creek (population 32,000), WDP and five other landowners, holding a combined 1,500 vacant acres throughout the town, are asking to convert their properties’ land-use designation to residential from retail and other commercial uses. Town officials estimate that a total of 2,200 homes can be built on those acres, which represent roughly 10% of the town’s area.

A study done last year for Queen Creek by consultant TischlerBise Inc. found that, if all 1,500 acres are developed as housing, the net cost to the city would be nearly $1.5 million a year. In contrast, Town Manager John Kross estimates that WDP’s mall alone would have generated more than $2 million in gross annual tax revenue.

In February, town officials instructed that the proposals go through an in-depth review of up to a year. Their concern is that the town’s general fund, nearly half of which comes from sales tax, remains greatly depressed from the downturn. It declined to a low of $18 million in 2010 from $34 million in 2008 as the global economy swooned. In turn, the town cut costs by dismissing roughly 100 of its 215 staffers, forgoing maintenance of parts of the town’s trail system and transferring some sports programs to local nonprofit groups.

Queen Creek’s general fund has recovered to $21.9 million this year, but city leaders remain leery of giving up on tax-generating commercial development. “We want to make sure we’re not upside down as a community,” Mr. Kross said. “If we evolve exclusively into a bedroom community, then our existing revenue streams are not sufficient.”

The market, however, wants housing more than retail in this recovery. U.S. single-family home construction is projected to rebound this year to three-quarters of its annual average since 2000. Meanwhile, retail construction is expected to amount to a third of its 14-year average, according to CoStar Group Inc. CSGP -2.34%

Examples of developers switching to residential from shopping centers are plentiful. In Las Vegas, real-estate investor Lightstone Group in February sold a 24-acre parcel that it had envisioned for a shopping center to instead be developed into apartments.