Everything in China seems to happen at a rapid pace. Trains whiz by at 150 miles per hour. Buildings go up seemingly overnight. Google flip-flops its stance on censorship almost daily.

In fact, in the 32 short years since opening up its economy and adopting more free-market policies, China has seen its economy rise from No. 11 in the world to No. 2, and it looks as if it will only take another decade or two to take the No. 1 spot from the United States. During that race to the top, fishing villages have turned into go-go cities of more than 10 million, and hundreds of millions of people have been pulled out of poverty. Over the past three decades, per capita gross domestic product in China has skyrocketed, but at $6,600 still remains about one-seventh that of the U.S., and one-fifth that of Japan, China's main Asian economic rival.

However, the Chinese are doing something else rapidly: aging. Despite expectations of continued strong economic growth, there remains a question of whether China is growing fast enough to get rich before it gets old. One of the unintended consequences of the country's infamous one-child policy is a rapidly aging and imbalanced population.

4-2-1, 1-2-4
Because of the one-child policy, Chinese children generally receive the benefit of four grandparents and two parents doting on and supporting them. However, as those children grow up to become the next breadwinning generation, the equation turns around, and now a single child has to care for two parents and four grandparents.

Obviously, this isn't just a family matter. Over the next quarter-century, the percentage of China's population over 65 is expected to more than double from 7.6% to 15.9%. Meanwhile, the working-age population is expected to peak sometime in the next decade. This means the China of a not-too-distant tomorrow faces the significant problem of fewer workers to support a large elderly population.

While modern advances in medicine help provide longer, healthier lives, it doesn't come cheap. The legendary savings rate of Chinese consumers should provide some cushion for this situation, but some cracks in the legend have recently been exposed. According to a paper by a pair of economists at Tsinghua University, the bulk of the increase in savings over the past decade has happened via corporate and government entities thanks to minimal wage increases and terrible interest rates paid on deposits.

Change in the wind
Things are changing, though. New government policies and frustrated workers flexing their muscles are combining to make the lot of the Chinese laborer (and his or her parents and grandparents) a better one. Last year, Beijing announced a $124 billion plan to improve the country's health-care system. This included extending insurance coverage to 90% of the population and building out the hospital and clinic infrastructure in rural areas.

The expansion of government-subsidized insurance coverage should provide ample opportunities for companies providing health-care products, devices, and services such as China Nepstar Chain Drugstore (NYSE: NPD), Mindray Medical International (Nasdaq: MR), or the recently IPO'd Concord Medical Services (NYSE: CCM) -- if they can maneuver through the government-imposed price caps and other mandates.

In addition to expanding medical coverage, provincial governments along China's east coast (the heart of the world's factory) have been implementing minimum-wage increases -- most above 20% -- to attract workers, a step few thought would be necessary even a year ago given what was assumed to be a nearly limitless supply of cheap labor.

Similar wage increases have been demanded and received by workers in factories that supply auto parts to Toyota and Honda, and Foxconn, the recently maligned electronics manufacturer, more than doubled wages for its line workers. These incidents may be the ones catching headlines, but the push for better working conditions has been spreading throughout China's manufacturing centers, leading many companies to start looking further inland for a cheaper labor pool.

Shifting into the future
The shift of factories from east to west as companies flee rising wages brings a free-market aspect to Beijing's efforts to develop the poorer rural areas of China. The government's heavy (often called excessive) investment in infrastructure throughout the country means manufacturers can transplant their operations inland without sacrificing access to their export markets, and brings relatively higher paying jobs to regions that need them.

When you combine allowing workers to claim a larger piece of the profit pie with an expanding social security net, you have two key components that promote the government's plan to shift China's economy away from exports to one more balanced with domestic consumption. While this rebalancing should shrink China's wealth gap and further improve the lives of millions, the question remains: Will it be enough?

Can China follow the path blazed by Japan and the other Asian Tigers, moving from sources of cheap labor to manufacturers of high-quality, high-value products? And more importantly, can it make this transition before its wave of elderly citizens arrives?

The answer to this question will be vital to the long-term economic development of China and could determine if the 21st century truly belongs to China. However, regardless of how this puzzle is answered, once China's population pyramid inverts, economic growth will become much more difficult as the productive members of society will be weighed down by obligations to their elders.

When that happens, investors will lose one of the major "no lose" investment themes of the past decade. Just hitching your wagon to anything Chinese won't work anymore, and like the more mature markets most U.S. investors are familiar with, stock selection will become the key to solid returns.