This is probably too tight a connection and there's a very high probability that even if you make the MAD-MEX flight your luggage won't.
I suggest that you ask IB to be rerouted on IB 3237 out of FCO, which lands at MAD at 10:10 PM. There are frequent high-speed trains from Florence that take about 1.5 hours to Roma Termini, then it's another 35 mins from Termini to FCO by airport train. IMO the transfer to FCO is a minor inconvenience compared to the risk of being stuck in MAD overnight and, worse yet, of being downgraded to PE.