Just because people have been making money with stocks with crazy P/E historically doesn't mean that its meant to continue
Especially when you realize on aggregate, Companies long term have to reflect profit and less P/E otherwise if your stock index fund has larger P/E ratio, then you are absolutely taking on higher risk
There is no free lunch.
You are also forgetting that the reason the extrapolation of stock markets growth from historical data correlates to future data is that there is a benchmark of productivity underneath it all. Stock markets theoretically grows when productivity of all businesses in an economy improve which can improve due to scientific and economic reasons and the faith in the system that it does improve
Quite frankly, if you can't observe this, do not invest in index funds but rather something else which can reflect some amount of productivity (Short term bonds are needed by govt to improve life of the people so that they can pay more taxes in aggregate and improve conditions thus improving productivity as well)
I recommend the book Intelligent Investing and The little book of common sense investing by the legendary John Bogle (May he rest in peace)