During the 1970s real returns were negative. Inflation-adjusted S&P 500 was 632 in 1970; it was 395 in 1980. After the 1970s it shot up; it was 788 in 1990, and then 2322 in 2000.
I've seen some academic papers remark that investors tend to undervalue the earnings side of inflation. They will discount future earnings by the high interest rates that go along with inflation, but they will fail to account for earnings growth that goes along with having a profitable business in a high-inflation environment, and for the changes in competitive dynamics that follows inflation. (When rates and expenses rise, it tends to flush out the more marginal and unprofitable firms, which means dominant firms have less competition.) Warren Buffett made a large portion of his fortune by investing in businesses with little competition during times of high inflation.
Basically, it's good to be a stock buyer in times of inflation, and bad to be a stock seller*.
That makes intuitive sense because stock valuations depend on interest rates. Long periods of low interest rates -> high P/E. Long periods of high interest rates -> low P/E.