SHANGHAI—It is hardly apparent in the official data, but inflation is becoming another headache for investors in China.

For most of this year, Chinese stocks have fallen and prices of government bonds have rallied—a typical response to the prospect of slower growth, which would tend to depress earnings and reduce upward pressure on prices.

But...