Hi Kelly,
I think you have a couple of terms confused.
Your NIE is your foreigners identification number; it just helps the Spanish government identify you. Once you have a NIE, it never expires. However, this does not give you the right to stay in Spain. That’s where the visa comes in. If you don’t already possess a NIE, then the Spanish visa process automatically incorporates the NIE process into it. 2 for 1! But it’s the visa that gives you the time limit on your stay in Spain.
Unfortunately, you must always leave Spain before your visa expires. If you have some extenuating circumstances, you can apply for a special extension, but the desire to travel around Spain some more does not qualify as an extenuating circumstance.
In addition, leaving and re-entering Spain does not give you extra time to stay in Spain. That works in some places but not in Europe. They’ve caught onto that trick! 😊
I know this isn’t what you want to hear, but my advice is to do all of your traveling in Spain and leave before your visa expires. If you respect your visa terms, you can always come back to Spain at a later date.
Just my two cents.