My husband and I are returning to the US after four months in Portugal. We were able to get a visa extension, and will be fine leaving Lisbon. However, we learned that our extension only applies to Portugal. We fly on Iberia to Madrid, then change to British Airways for our flight to the U.S., and I am concerned that we would be in violation of overstaying our visa in Spain, since it is in the Shengen zone.
Does anyone know if we will have to go through passport control in Madrid?
You will not go through passport control on the flight from Lisbon to Madrid, that is inside Schengen. You will go through passport control for exiting Schengen when you catch your flight out of Madrid, and if you are a non EU/Schengen citizen they will stamp your passport.
As to whether they will complain about a few hours ion Spain I cannot say. AFAIK most residence visas for Schengen countries (which is what I assume you have) also allow visits to oter Schengen countries. For the practical reason that there are no border checks, on the ground and in the air, so they can't stop you. Visas are a standard design to aid passport officers in different countries.
I did find these two official references, not Spain but Denmark and Finland
http://www.migri.fi/working_in_finland/travelling_when_in_possession_of_a_residence_permit
https://www.nyidanmark.dk/en-us/coming_to_dk/visa/schengen/residence_permit_schengen.htm
Foreign nationals who have been issued certain types of residence permits in the other Schengen countries do not need a visa to enter Denmark. The same applies to foreign nationals who have obtained visas for long stays from other Schengen countries (D visa).
Your question may be beyond our ability to offer sound advice, but in general, a valid visa in one Schengen country allows you to travel and pass through the others. You'll also have proof of your transit from Lisbon and on to the U.S. So any questions in Madrid would be easily answered.
There is no "Schengen visa" per se. Each country still issues their own visas for stays over the 90 day tourist limit.
Thank you. This is somewhat reassuring. At this point, I think we've done all we can do and will just hope for the best. Thanks.