Hi, Tammi,
This is the very flight I take every summer. I fly from Santiago to Madrid on the Iberia flight leaving around 9:15 am and connect to the Iberia flight from Madrid to Chicago. I am assuming this would all be booked on the same ticket, if so, go for it. If the flight from Santiago to Madrid is late and you miss your connection, they will rebook you on a later flight, either through London or some other less convenient connection, but you'll get there. But if you are buying separate tickets, I wouldn't risk it. If they are separate tickets, and you miss your connection, it's your problem not theirs.
If you're flying into Madrid on Iberia, you will arrive in the new fancy flashy T4. But the international flights leave from the satellite building of T4 (gates R S and U), which requires several elevators (do not take the escalators, they will slow you down), a train ride, and then more elevators. You won't have to go through security again, though. I have made this connection many times. But I know that someday I won't, and I'll just let them rebook me.