A ‘far as I know’ the NIE as stated above is for life…
Whereas, a residency certificate is also valid indefinate (unlike the residency card which had to be renewed every 6 yrs)...
But the onus is on the holder if you leave/want to de-register (I have seen on the form that you can apply for ‘baja’ - i.e deregistration).
Re your tax situation…. you should just be able to go to the Hacienda again and start up again (presuming you went baja for the duration of your time away). Likewise, you will be straight back in the Social Security (medical) system once you start paying those contributions too.
Just be careful you don’t owe any tax for the time you were away .... I.e they think you were were working when you were not! As they can claim back taxes for 4 years after.
Let us know how you get on?
sj