In the race to open offices throughout the globe and lure rainmakers to their ranks, some law firms took on debt they expected to have no trouble paying—a once-safe bet that is now backfiring for some. An industry that has historically been perceived as a low credit risk, attractive to banks, is starting to see cracks in that facade.