This explains why I only fly on American Airlines and its codeshare (OneWorld) partners when flying into Spain. All arrivals and departures are at T-4. The process is smooth, despite T-4 and the Satellite terminal being HUGE. Moving walkways and a good underground train connect the satellite to the main terminal and make moving from arrival to connecting gates relatively easy.
As MSPATH states, you frequently arrive at baggage reclaim, after passport control, before your bags arrive. If you are connecting at Madrid, say to fly to Bilbao, Oviedo, Pamplona, Sevilla, Barcelona, or Santiago, the transfers are relatively easy and your bags are automatically sent to your final destination.
In the EU, customs is done at your final destination. Only passport control (immigration) is done at the first port of entry. So, for example, if you are transiting Madrid to head for Pamplona, you clear passport control at Madrid, on your way to make your connection.
You will not see your checked luggage until Pamplona. Usually customs clearance at your destination is an easy green door / red door thing. Typically, if you do not choose to declare something, they leave you alone.
So, if you only use the airlines that use T-4 at MAD, your arrival or departure to or from Spain will be much less dramatic and quicker... at least IMHO and experience.
Hope this helps.