Why investors are dumping the capital markets for real estate