ucodegen, one other factor I can think of for the cost difference is room occupancy. Hospital are usually not at 100% room occupancy most of the time. There are fixed cost that they still have to pay regardless of how full they are. While nursing homes are much more likely to be at or near full occupancy.
I know someone who works at a non-profit hospital and yet, their budget is also very tight. So, it’s not as lucrative as you think it is. Maybe a publicly traded hospital might have their cost structure for you to see in their earning report.