U.S. companies are buying back record amounts of stock this year, but their shares aren’t getting the boost they bargained for.

S&P 500 companies are on track to repurchase as much as $800 billion in stock this year, a record that would eclipse 2007’s buyback bonanza. Among the biggest buyers are companies like Oracle Corp., Bank of America Corp. and JPMorgan Chase & Co.

But...