Are a large part of the people living in a city the kind of semi-transitory-but-also-there-for-years people you describe?
I'd wager that's a small proportion of almost every city. Most cities will have tourists who are visiting for a few days or weeks, and long term residents who have a permanent address there. The percentage of people living full time in hotels or airbnbs must be tiny. Perhaps in high cost of living cities there's more "hidden homeless" living on couches, but even then it's not going to be "a large part" of a city.
I don't have sources but for cities like Amsterdam I wouldn't be surprised if 5% of the population isn't registered with the municipality for various reasons. But have been living there for years. Plenty of people I know would sublet empty rooms of their social housing apartment, which is highly illegal but for some people the only way to find a place to stay. But you obviously can't register because then the person subletting would be kicked out.