Private credit firms are seeing an opportunity to finance everything from public transit systems to local utilities as the federal government and banks pull back on funding.