Investors are giving up on stock picking.

Pension funds, endowments, 401(k) retirement plans and retail investors are flooding into passive investment funds, which run on autopilot by tracking an index. Stock pickers, archetypes of 20th century Wall Street, are being pushed to the margins.

Over the three years ended Aug. 31, investors added...