Everytime you leave the country you need to have your passport stamped at customs, and eventually you’ll need to re-enter the country and show your ID or passport. At re-entry, you can be checked. This plus a yearly in-person check mandate can make sure you stay there.
The post is about non EU residents right? Spanish citizens might own multiple properties and I cannot stop that. And also, nobody is going to come and check if you live there, all that’s necessary is a physical letter to the location requiring you pass by a police office or citizen’s bureau in person and identify. Literally 1 minute’s worth of a job. And it would only be for non-EU residents.