So index funds are no solution, unfortunately. They'll lose deposits if they sit on the sidelines (as people compare 8% returns to 15+%), so their incentives are not aligned with avoiding the bubble.
The perfect scam, er virus, lives well enough to spread but doesn't kill quickly.
I feel pretty safe that if the AI stuff underperforms for whatever reason, that excess capital will flow back into boring things like Walmart. Or if AI eats the world, well, owning an index means I still have a piece of the pie.
You're assuming within-pie transfers.
US equities in 1990's were 40% of the world market; now they are 80%. It's pretty easy to imagine them going back to 40% or less as capital moves elsewhere. But owning indexes across currencies and markets is another layer of risk.
(Also a reminder that target funds are expensive and will sometimes be over-allocated towards hot industries depending on the retirement year "target".)