Ok, here we go.
If you are resident in any European country for more than three months but less than six months you have to register with the local Town Hall or Police station (depending on which country you are in) in order to to register your prescence in the country, basically they want to know you are there and who you are.
If you are staying for Six months (and one day) or longer you automatically become tax resident in that country.
That is all you need to know, and it applies pre brexit and post brexit, nothing changes, this is European law wether the UK is in or out.
Just a little story of where i live on the Costa del Sol, recently we had two Moroccan guys staying in an apartment within our complex, two guys and they had three cars parked in our underground secure car park. Nobody ever saw them, except at night when they went out. People started asking who they were and of course no-one knew - not even the owner of the apartment - he just rented it to them! Suddenly there were a few complaints about them hanging the duvey over the terrace walls (against our community rules,
They were spoken to by the President and eventually the owner who suddenly became suspicous about his renters, two days later they were gone!!
The point of the story is that in some areas (certainly on the Costa del Sol) people rent out their properties without any formal checks on the renters and nobody knows who these people are, they could be terrorists (ususally they are drug dealers or car theives), and yet Spain has the same legislation as the rest of Europe but fails to enforce these rules.
Me and "her indoors" travel Europe often and always have to send a copy of our passport ahead of our arrival in any country so we can be registered on the tourist register, usually with the police authorities, why not Spain??