Upvote:4
If you have been in the UK for more than twelve months or have established a residence in the UK over twelve months ago, your foreign license is not valid in the UK. That doesn't affect its validity in Spain. Your status in the UK does not prevent you from using your Indian license in Spain.
Note that the question of whether you are a UK resident probably does not depend on your immigration status or your tax status so much as it does on section 108 of the Road Traffic Act 1988. Note that the threshold here is 185 days, not 183, and that the reason for your presence in the UK is important:
(1A) In this Part of this Act, unless the context otherwise requires, a reference to the expiry of a licence is a reference to the time when it ceases to be in force (and “expired” is to be interpreted accordingly).
(1B) For the purposes of this Part a person is normally resident in Great Britain if—
(a) the person lives in Great Britain for at least 185 days in each calendar year because of—
(i) personal and occupational ties, or
(ii) close personal ties, or(b) the person has personal ties in Great Britain and occupational ties in another place in the EEA and consequently lives in turn in Great Britain and that other place.
(1C) For the purposes of this Part a person is normally resident in the United Kingdom if—
(a) the person lives in the United Kingdom for at least 185 days in each calendar year because of—
(i) personal and occupational ties, or
(ii) close personal ties, or(b) the person has personal ties in the United Kingdom and occupational ties in another place in the EEA and consequently lives in turn in the United Kingdom and that other place.
(1D) In order to be normally resident in Great Britain or the United Kingdom by virtue of subsection (1B)(b) or (1C)(b) a person must return there regularly, except when the person is living in another place in the EEA in order to carry out a task of a definite duration.
(1E) For the purposes of subsections (1B) and (1C) attendance at a university or school is not a personal or occupational tie.
In my experience, it's possible to rent a car in Spain without an international driving permit (IDP), but if you look at the Spanish government's page on licenses that are valid in Spain you can see that domestic licenses must comply with the relevant annex of the Geneva Convention on Road Traffic or the Vienna Conventions on Road Traffic. These both specify, for example, that it say "Permis de Conduire" in French.
If your license does not comply, you may be able to rent a car, but the police might consider your license invalid, and so might the insurance company if you have to file a claim. I've heard of this happening in Greece, but it could presumably also happen in Spain. I don't know how likely it is to happen. To be safe, you should get an IDP, which you will need to do from a zonal office in India or from the Western India Automobile Association.