If your first flight arrives on-time, you wonīt have any problems catching your ORD connection. Your baggage should make it as well. Donīt waste time browsing in shops, go straight to the T4S shuttle though. If you do not know Mad airport, I advise you to check some maps, so you have a better idea, although it is very straightforward. If everything goes well, it should take you between 10-15 min from the time the doors open to getting through passport control at T4S.
Btw, donīt bother taking the escalators down to the shuttle in the main T4 building: take the lift!