Optimism about the future may be declining in the U.S., but it's alive and kicking in many poorer countries.

Residents of emerging and developing countries -- many of which have rapidly growing economies -- believe children in their nations will enjoy brighter financial prospects than their parents, according to a report released on Thursday by the Pew Research Center.

It's the exact opposite for people who live in richer countries, many of which are still mending their wounds from the financial crisis.

For example, just 13% of respondents in struggling France told Pew they are optimistic about the next generation's prospects. Compare that with fast-growing Vietnam, where a whopping 94% of respondents are bullish about the future.

The only other countries where at least seven in ten respondents were optimistic are China, Chile, Brazil and Bangladesh.

"As they continue to struggle with the aftereffects of the Great Recession, publics in advanced economies are pessimistic about the financial prospects of the next generation," Pew researchers wrote in the report.

Related: Why you don't feel recovered

Americans are growing more pessimistic: Sluggish economic growth in richer countries like the U.S., Japan and many European nations has given citizens little reason to believe the future will be brighter.

The Pew survey of more than 48,000 people in 44 countries shows that just 28% of advanced economy respondents believe their children will be better off. A whopping 65% say their kids and grandkids will be worse off.

Even though the American economy is improving, the dark clouds of the Great Recession still linger. Just 30% of U.S. respondents were optimistic about the future.

So far, the Pew survey appears to be a lagging indicator of economic growth, rather than a predicative one.

"People are responding to the growth they've experienced recently," said Katie Simmons, a senior researcher at Pew who co-wrote the report.

Keys to success: Alongside optimism, Pew surveyed people's attitudes about what it takes to get ahead in life.

Americans are notorious for their work ethic and sure enough 73% responded that working hard is "very important" to success in life. That's more than any other country in the Pew survey.

Interactive: From Brazil to Uganda - What it takes to get ahead

Just 25% of people in France said working hard was very important and only 18% of those in China said the same.

Education is viewed as the most important key to getting ahead around the world. As many as 78% of those in Nicaragua and 86% in Venezuela believe education is essential.

Some people also believe luck plays a big role, though it's not seen as the top factor. Seventy-five percent of global respondents ranked luck a seven or higher on a scale of 1-10 in terms of importance.

Inequality vs. free markets: Not surprisingly, inequality is worrying people around the world. However, it's only ranked as the biggest economic problem in four of the 44 countries surveyed.

Related: Thomas Piketty on inequality

Citizens of advanced economies are more likely to lose sleep over public debt and high unemployment, Pew said. People in emerging markets and developing nations are more concerned about inflation and jobs.

Worries about inequality and other issues have helped lower support for the free markets in a few countries since 2007. The countries that have most soured on capitalism in the Pew survey are Spain (-22%) and Italy (-16%).

Still, most people don't want to ditch the free-market system. A global median of 66% believe most people are better off under capitalism.

Interestingly, 70% of Americans support the free markets, but that's actually below China (76%), Bangladesh (80%) and Vietnam (95%).