As long as the 9am flight will not cause an illegal connection (i.e. it allows for the required minimum connection time) call AA and ask to be put on the 9am. They should accommodate this, for free, as long as their is availability on the flight.
(And I don't see any reason the 9am would cause an illegal connection unless they moved the Madrid flight time up by a whole lot)