According to an article in Charles Schwab on Investing, Fall 2007 (p. 7), which looks like it was written by Matt Wood, stocks are a better investment than housing:
[R]esidential real estate provided an annualized return of 8.6% during the period from 1978 to 2004, compared with 13.4% for the S&P 500 Index (citing Jack Clark Francis et al, Contrasting Real Estate with Comparable Investments, 1978-2004, April 2007)
In some cases, [owning a home costs] as much as three times the purchase price [due to insurance premiums, maintenance costs, and property taxes]... Robert Shiller says real estate's historic real returns are closer to zero after adjusting for inflation. [David Crook, "Your Home Isn't the Nest Egg That You Think It Is," WSJ Online, March 12, 2007]
I refused to buy any property during the last five years, believing that everything in California was overpriced. Now, however, I am not so sure. Housing and other hard assets might not be a great investment, but they no longer appear to be flagrantly overpriced.