With so many people woefully behind in their retirement savings, you'd think that baby boomers approaching retirement would be the most frightened about their future. But a recent study reveals the greatest amount of fear from a much more unexpected source: people in their mid-to-late 30s.

Later in this article, you'll find some tips that savers of all ages can use to try to shore up their retirement prospects. But first, let's take a closer look at the most recent research from the Pew Research Center and see what its findings reveal about the current economic environment, especially as it affects investors.

Lack of confidence
Overall, confidence about whether people will have enough income and assets during their retired years has decreased sharply over the past several years, which stands in stark contrast to the experience that investors have had. Even as the stock market has doubled and many investors' portfolios have regained much if not all of the ground they lost during the 2008 bear market, the percentage of those surveyed who said that they were very or somewhat confident about their retirement prospects fell from 71% to 60%.

What's even more surprising is that younger adults with decades to go before they'd even consider retirement are more anxious about their prospects than members of the baby boom generation, who have reached or are rapidly approaching retirement. More than half of those aged 36 to 40 are either not too confident or not at all confident about their chances of having enough put aside to last throughout their retirement years. That's a big change from three years ago, when boomers were the ones most concerned.

What's going on?
The report points to a couple of phenomena that partially explain the results. 30-somethings got hit especially hard by the housing downturn, with big declines in home equity hurting their net worth. Although older homeowners also took a hit, they tended to have more money in other assets as well, cushioning the blow.

Moreover, stock ownership among those aged 35 to 44 fell more on a percentage basis between 2001 and 2010 than for any other age group. The decline weighed in at 9 full percentage points, more than twice that of the age cohorts surrounding it.

Missing out
It's hard to exaggerate the impact that not staying consistently invested during the downturn and subsequent rebound had on overall returns. Among S&P 500 companies, nearly a quarter lost 50% or more between the beginning of 2008 and the March 2009 lows, yet recovered all of their losses -- and in some cases, quite a bit more -- over the ensuing three and a half years.

Apple (AAPL 1.27%) is perhaps the most obvious example of the folly of selling at exactly the wrong time during the market meltdown, with investors growing too pessimistic about the lifespan of its mobile products. But several companies, including Ford (F 0.08%), Intuitive Surgical (ISRG -0.55%), and Starbucks (SBUX 1.00%), fully recovered from even steeper declines. By avoiding bankruptcy, Ford defied the rest of the industry and found ways to become profitable, lifting its bond rating back up to investment grade and restoring a dividend. Intuitive Surgical managed to prove the value of its da Vinci surgical systems even under stressful conditions in the health care industry, while Starbucks met competitive pressure from lower-cost coffee options and still cemented its industry-leading position. Limited Brands (BBWI 1.04%) posted the biggest comeback, providing a total cumulative return of 274% since the end of 2007 despite having been down 65% in March 2009.

Looking forward, though, it's not too late for adults in their late 30s to get back on track for a prosperous retirement. By working on eliminating debt, building up emergency savings to handle unexpected expenses, and then slowly building or rebuilding investment accounts while taking advantage of any available benefits like employer matching of 401(k) contributions, a 25-to-30-year time horizon gives you plenty of time to weather the inevitable bumps in the stock market and end up ahead.

Be confident
After a huge stock market rally that has helped so many people recover from the worst of the financial crisis, it's disheartening to see middle-aged adults missing out on the wealth-creation in the market. With renewed emphasis on investing, however, you can succeed where others will merely remain fearful, by giving yourself the will and ability to invest successfully for retirement.