I don't know about France or Italy, but Spain does not consider you tax resident just for having a home there, only if it is the center of your vital interest.
But of course, Spain may claim it's the center of your vital interest and they will also count "sporadic absences" as days spent in country (for example, you spend 2 months in Spain, 1 month in the US, 2 months in Spain, 1 month in Thailand, 1 month in Spain) - now they can say you have spent 6 months in Spain and will be tax resident.
But if it's really only a vacation home and you mostly live in one other country where you have another home and you are tax resident there etc. - then Spain should not consider you tax resident, even under their own laws. And if there is a treaty, the treaty should offer additional protection.
But then the question is, do you really want that risk?
I would also recommend having a family member buy or rent the place, someone who really lives in another high tax country full time. And then you just use their place sometimes...
But of course, Spain may claim it's the center of your vital interest and they will also count "sporadic absences" as days spent in country (for example, you spend 2 months in Spain, 1 month in the US, 2 months in Spain, 1 month in Thailand, 1 month in Spain) - now they can say you have spent 6 months in Spain and will be tax resident.
But if it's really only a vacation home and you mostly live in one other country where you have another home and you are tax resident there etc. - then Spain should not consider you tax resident, even under their own laws. And if there is a treaty, the treaty should offer additional protection.
But then the question is, do you really want that risk?
I would also recommend having a family member buy or rent the place, someone who really lives in another high tax country full time. And then you just use their place sometimes...