I am a 79 year old British Citizen living permanently in Spain with my 58 year old Russian born wife who holds a Russian passport. We both hold an NIE number and have registered the Padron. We don´t have an income as we live off my pension and UK Benefit. My wife is concerned about what would happen to her if and when I die (most likely that I would go first!). Would she be able to remain living in Spain or would they make her return to Russia. We have lived in Spain for 5 years in rented properties. Also what is likely to happen to us if the UK votes to leave the EU.
Since you've lived in Spain for over five years, your wife has acquired a right of permanent residence independent of her marriage to you. She will retain this if your marriage ends, whether by your death or by divorce, or even if you leave Spain while she remains.
Directive 2004/38/EC specifies, among other rights of residence, a "right of permanent residence in the territory of the Member States for Union citizens and their family members."
Your wife will have an easier time asserting this right if she holds a residence card that notes that she is the family member of an EU citizen. If her residence card does not say this, you may want to get one that does, or at least consider whether to discuss the matter with a lawyer.
Even if she cannot establish five years' residence meeting the conditions for establishing a permanent right of residence, she may be able to benefit from the provisions of article 12 (or, in the event of divorce, of article 13). Article 12 concerns the "retention of the right of residence by family members in the event of death or departure of the Union citizen."
Chapter IV concerns the "right of permanent residence"; its first two paragraphs are the most significant, so I will quote them here:
Union citizens who have resided legally for a continuous period of five years in the host Member State shall have the right of permanent residence there. This right shall not be subject to the conditions provided for in Chapter III.
Paragraph 1 shall apply also to family members who are not nationals of a Member State and have legally resided with the Union citizen in the host Member State for a continuous period of five years.
Assuming your wife has held an EU-family residence card for 5 years, she should probably apply for a permanent residence card as noted at Permanent residence (>5 years) for non-EU family members. This will document her right, independent of yours, to live in Spain permanently, without conditions.
To address your last question:
What is likely to happen to us if the UK votes to leave the EU?
I would guess that those who've already aquired permanent residence under 2004/38/EC will continue to enjoy that right, but it's really impossible to know. If the UK were to try to expel those who enjoy permanent residence in the UK under that provision, then it would obviously be far more likely that British citizens permanently resident in EU countries might find themselves facing additional conditions or constraints. They might be required to justify their ability to support themselves, for example.