With second-quarter earnings season kicking off, investors will get a view of consumer health in an economy still stuck with high inflation as the U.S. stock market climbs this year.