This is a pretty reasonable theory. And it's true, if everyone indexes then stocks generally become mispriced. But this theory only applies at the extreme, not at the margins if say 50% or 90% of money is in index funds. If a few savvy traders buy the good stocks and sell the bad ones, they make a profit and the stocks become "correctly" priced again.
In one view of the market, this is what all those hedge funds are paid to do. They keep the prices correct and extract some money, while everyone else indexes and pays them a small fraction of their returns. Of course, hedge funds aren't getting much of that pie these days.