Hi,
@meggie, (and welcome to the forum btw!)
I have made connections that close, but just barely and with some good luck. Your domestic flight will probably depart from the main T4, but your international flight will come into T4S, the satellite. That means you have to clear immigration, take the train, go through security again, and find your gate. I don’t know about the QR code check, but that might be involved as well. I’m assuming you’re not checking luggage, but if it’s not one ticket you would also have to pick up checked luggage and recheck it. That would be impossible, IMO.
It doesn’t sound like you have booked this all on one ticket, and that’s the only way I would try this (are you flying direct Charlotte to Madrid?). If you can, you should check into booking the flight all the way through to Santander, which you can easily do because you must be flying on a One World partner or else you would not be landing in T4.
You may already know this, but if it’s not one ticket and you miss your flight, that’s you’re problem, but if you have a through ticket to Santander and you miss the connection, the airlines takes care of you. Not only does that mean you don’t lose any money, but it is also so much easier if the airline personnel are helping you rather than have to find a new flight on your own, etc.
And it may just be my bad luck, but every time I fly an American flight into Madrid, we land at the very end of T4S and have a long walk to immigration. Thankfully, immigration is in the middle, so it’s only half the terminal to cross!
Good luck with this, buen camino, Laurie