I am currently living in Spain on a 5 month trip, I was granted a student visa for 180 days. This is a type D visa and I would like to travel in the month after my program is finished, will I have problems with this if I have already lived in the country of issue for 90 days? and as a bonus question, can I re-enter the Schengen Zone through a different country to return to Spain?
Curious but the other related questions while answer the question whether you can travel on a D to other Schengen countries (yes) does not emphasize this fact: the 90/180 rule only applies to the countries you visit. The country where you reside with a D visa does not fall under the 90/180 rule as you are not a visitor there but a temporary resident.