Inflation, labor shortages and capacity constraints left major Boston hospitals in the red at the end of 2022.