The world’s biggest investors are still buying stocks, even as the U.S.-Iran war keeps inflation risks high.