the market is a bad predictor of the health of the economy, actually.
But, to your question, inflation will be baked into the market values in the long run. Prices being up 19.4% doesn't automatically equate to company values being up 19.4%. Of course, market cap probably isn't a very good estimate of company value much of the time anyway. There's a lot of expectation built into market values, which skew the numbers higher/lower than actual