In Great Recession, far better to be a state than a city
"You only have to look at Detroit to know the real risks ... a huge burden on the public finance system."
States are doing great, at least when compared with America's cities.
The credit rating of the states' sector was recently upgraded to stable by Moody's Investor Service—a significant change that coincided with the five-year anniversary of the financial crisis. Through June, the states had reported 14 straight quarters of revenue growth, with most states passing their precrisis revenue peak.
But even with a strengthening economy and growing tax base, the outlook for U.S. cities and towns remains mixed. One lingering lesson of the crisis is that when an economy collapses, a state can dump its problems on local governments.
For every Detroit or San Bernadino, Calif., there are towns and cities nationwide with less severe problems but a significant gap in relation to the state recovery.
"Higher levels of government push their problems down to the lower levels," said Bob Kurtter, managing director of U.S. public finance at Moody's. The process is referred to as "downloading" by some public finance experts.
Conversely, cost-cutting by states is made easier by the fact that they can get federal aid and stimulus dollars in areas including health care and transportation.
"States got through the recession in pretty good shape and now find themselves in a better position," Kurtter said.
(Read more: The senior franchise boom)
Laura Porter, managing director at Fitch, said the first thing states do in a downturn is to look to reserves and higher education, and then cut or freeze Medicaid spending and "download" to local governments, which focuses on K-12 education.
"It's easy for them to cut, versus a local government, which actually provides services," she said.
While shaving funds for K-12 is more politically sensitive than cutting money for higher education, state-level cuts to K-12 were more common in the recent downturn than they have been historically.
"States directly cut funding or scaled back the rate of growth and the local municipalities had to deal with the problems. That's downloading," Porter said.
The recovery of states tracks that of the larger economy. They are benefiting from growing sales and income tax receipts, high-earner income tax payments triggered by stock market gains and a one-time revenue boost caused by tax law changes effective in 2012 that accelerated payments from wealthy individuals.
Sales taxes also reflect the general economy and increased consumer confidence, including the rebound in auto sales, which is a big source of state sales tax revenue. And income tax has added significantly to state revenue since the recession.
Income tax accounts for 40 percent of state revenue in California—one of the 10 largest economies in the world, with total revenue of roughly $100 billion—and in the past two decades has risen as a percentage of the state's overall revenue by 25 percent.
For example, Kurtter said, "when Facebook went public, the impact of early employees exercising options had a measurable impact on California revenue collection, and that's for a state of 36 million people."
(Read more: That police officer ... is a robot?)
In contrast, towns and cities rely primarily on property tax—a distinction that's important in explaining municipalities' lagging performance.
Most recessions since the 1950s have been limited to a sector or region, such as Midwest manufacturing or energy, and tech booms and busts. Even real estate busts were historically regional. But the Great Recession was the first downturn in recent history that affected the entire nation at one time in housing—the primary revenue source for local coffers.
"In general, the issues have proven to be more challenging on the local government side," Porter said.
(Read more: Made in USA fuels new fashion hubs)
That's not a surprise, though. Because of the different tax bases, downloading and the nature of the recession, the situation for cities is "playing out the way we would expect," Kurtter said. At the beginning of the recession, downgrades on municipalities were less frequent than those on states.
"It took a year and a half or two until the problems cropped up at the local level," he said. That dynamic should also be true on the upside: An improvement in the housing market will translate into tax value for cities, and the rating agencies expect that.
"It hasn't happened yet, but it's just beginning," Kurtter said.
While bankrupted cities represent the extreme, they show the larger "reality of costs coming home to roost," said Michael Shires, associate professor of public policy at Pepperdine University. "You only have to look at Detroit to know the real risks … a huge burden on the public finance system."
For example, he said, Los Angeles' pension fund shortfall, once $10 billion, is now $23 billion, based on new accounting standards that dictate how pension funds should report their liabilities. He estimated that the city must come up with at least $300 million a year for the next 30 years to close the gap.
So once America's towns and cities recover from the "blip" of the Great Recession, they can turn to dealing with the real problems and challenges.
Historically, "it's been easy to be generous," Shires said. "As Detroit has shown us, and San Bernadino may show us, it is possible that the time will come when the high costs of these commitments exceed both the public's willingness and ability to pay."
—By Eric Rosenbaum, CNBC.com