For folks like that our city (NY) has set up sharing of a different type that is much safer for elderly with spare rooms and less well off residents long term. The NY Foundation for Senior Citizen’s free Home Sharing Program helps link adult “hosts” with extra private spaces in their homes or apartments with appropriate adult “guests” to share their space. One of the matchmates must be age 60 or older which means younger guests can and do reside with them. They even use a database, to help them determine the “most potentially compatible matchmates by inputting their 31 lifestyle objectives”.
Ideas like these are how cities can safely alleviate the issues you mentioned especially with respect to elderly who often need the income most.