NEW YORK (TheStreet) -- In a sign the 2008 financial crisis is still weighing on Americans' minds, a new study shows only 17% believe stocks are the best place to invest for the long-term. Experts warn that this mindset -- if it continues -- could greatly hamper their ability to build large enough nest eggs to get them through their golden years.

The study, conducted by Princeton Survey Research Associates International for Bankrate.com, found Americans -- especially millennials -- are having a tough time shaking the memory of both the dot-com bust of 2000 and the stock market meltdown that accompanied the financial crisis of 2008. 

"Individual investors still fear short-term volatility more than they desire the potential for long-term gains in the stock market," said Greg McBride, chief financial analyst at Bankrate.com, a research company that tracks banking and financial data.

Though we're now into the sixth year of a bull market, Americans still haven't regained their confidence -- which is different from past downturns, he said.

"In past periods, there's been a tendency for individual investors to chase performance," said McBride. "While they'd get scared out of the stock market in a recession, they would pile back in once the market had recovered lost ground."

In fact, the survey found confidence is waning for stocks despite the ongoing bull market run. The 17% figure is down from 19% a year ago.

McBride believes it's the double-whammy effect of both the 2000 tech bust and the 2008 recession that jolted investor confidence in stocks. Large numbers of Americans who bailed on stocks following the tech implosion of 2000 sat on the sidelines while the market rebounded, and then finally jumped back in around 2005 and 2006 -- only to be clobbered again by the 2008 crash. "Those are the investors who feel burned not once -- but twice," he said. "And that's why we haven't seen that typical behavior where the individual jumps back on the stock market bandwagon."

Millennials are feeling particularly jittery. "Both the tech bust and the financial crisis came during their financially formative years, and so it's had a much bigger impression on them than somebody who has been in the market for a much longer period of time and seen the ups and downs," McBride said Older, more seasoned investors tend to take it in stride "like we've seen this movie before."

The survey found stocks came a distant third behind real estate and cash as places Americans would invest money for the long-term. Gold and bonds fared worse, at 14% and 5% respectively. The study showed 27% favored real estate, which is up from 23% a year ago. Americans seem to have warmed up to real estate again now that home prices are rebounding. "Yet they haven't warmed up to the stock market, even though the stock market has greatly outperformed real estate," McBride said.

About 23% named cash investments, such as savings accounts and CDs, as the best place to park their investment dollars. Millennials were the biggest advocates for "cash" investments, with 32% naming cash as the best place for long-term investing. By contrast, only 21% of those between the ages of 30 and 64 prefer cash.

 McBride sees a danger in this prolonged "cash" mindset. "We're going to have millions of Americans who are going to fall short of where they need to be in accumulating a retirement nest egg," said McBride. People can't save enough in cash alone. "They need the compounded returns from the stock market over a period of decades to accumulate that nest egg," he said.

And the millennials are particularly vulnerable. "They will have the biggest retirement savings burden in history," he said. Their lifespans are expected to be longer and their health care costs higher than previous generations. Also, many don't have pensions and they face uncertainty over their Social Security benefits, he noted.

"The fact that millennials save is good, but the problem is they're not investing their long-term money in an appropriate fashion -- and that's a risk," he said. "The greatest risk over the long-term is investing too conservatively -- it's not the risk of day-to-day volatility."