As the U.S. government retreats from funding environmental, health and social needs, private investors and fund managers are moving in.