This is not legal advice, but based on my research.
1. Don't buy a house in Spain, rent. Same with a car, rent instead of owning assets.
2. If you want to stay in Spain over 183 days, you need to establish tax residence somewhere else too, and form stronger ties. For example, in Barbadas, UAE...