Connecting flight and checked luggage with Iberia

Next week I will fly by plane for the first time.

I have checked baggage in my itinerary and it says it applies to PRG – SDR. However, there is a transfer in madrid. The itinerary says I should arrive at terminal T4 (not T4S). Is that possible? I have to wait more than 12 hours in Madrid. Both flights are from Iberia, and the company says on its website that I have to check my luggage again in this case.

Does this mean that I have to pick up my baggage at Terminal 4 and walk completely out of the terminal and do the whole procedure again? Will my boarding pass still work?

(see exceptions)

Departure time into Madrid is 18.50 (31.8). Next departure at 7.40 (1.9.).