Index funds will survive anything short of a complete collapse of the financial system. Even if returns are low, they only have to be better than the alternatives (on a risk adjusted basis).

Sure - but being better than the stock-alternatives in a fifty year bear market is cold comfort; and many retirement plans are built on assumed real returns that may never be seen again.

if the consumer base collapse what will keep the stock fundamentals going ?

Stock values may decline but there will still be index funds holding those stocks.