Hola if you drive out of Spain then return you can keep a UK car here (I think for six months at a time)
the cost to import the car with new lights ITV etc is around €2,000 but to buy a car here is a huge risk
I bought a car from Specialist Vehicles in San Javier, two weeks later the engine blew up then they would not respond to my e-mails phone calls so I lost €3,000 ( a lot of money more so for an O.A.P on a state pension)
I would advise finding Paul of CARSINSPAIN he is very helpfull
But take your time and think things over