I don't personally find it that difficult or complicated to incentivise stuff like that. Downtime... or just time passing really..
allows the DM to introduce events that make stuff like having castles worthwhile. Keeps can serve to protect the town if goblins come raiding while the PCs are off between adventures. (Good-aligned and a decent percentage of neutral PCs will tend to care about this). Or possessing property might guarantee status and respect amongst the nobility if the party ever needs to deal with them. And likely keeps out the elements if nothing else.
The most obvious response I can think of, if the players try to ignore housing, is to impose minor penalties or just narrate unpleasantness if the PCs choose to go that route. It IS part of the GM's job to dramatize the world, after all. Living without a permanent shelter can be harsh. Maybe let the vagabond PC make a quick survival check before the next adventure session to represent their ability to rough it in the wild without unpleasantness (some character types are likely skilled and/or used to such things afterall). Failure may result in stuff like...
* The PC being filthy and/or smelling bad (disadvantage on charisma checks with civilized humanoids and a suffering a host of microaggressions from them)
* The PC starts the next adventure with a temporary max HP reduction and possibly a level of exhaustion from cold or hot weather exposure in the absence of good shelter.
* The PC suffers from a host of mild but longer term ailments like malnutrition, fleas / lice / or other parasites, frostbite, scratches, bruises, or other minor not-fully-healed injuries, torn and weathered equipment. The DM imposes disadvantage on up to three d20 rolls the PC makes over the next couple sessions that would not otherwise have it.
Yeah, I would tend to advise against forcing or even encouraging players too strongly to engage with social or base management types of mini-game. I know many people who are just not into that sort of thing. I get around this by offering some default or "simple" options when I give the players downtime between sessions - they can work a day job for a little bit of money, research various plot subjects, or just party... gaining heroic inspiration at the start of the next adventuring session. I try to keep things uncomplicated and fast-moving.
Always made more sense to have magic item "brokers" than magic shops to me personally. Given the level of expense relative to commoners' wages in one's presumed fantasy-medieval world. With magic items being registered and sometimes requiring a license from the King or other government official.