It could be doable. It depends which terminals each flight is using.
I've had 2 connections through MAD. Both had baggage issues.
The first was FCO-MAD-LHR on the same ticket (IB>BA). When I checked in at FCO, they were able to give me boarding passes for all sectors (including connection past LHR), but baggage kept coming up as 'unable' past MAD. The IB agent at Rome kept trying for 20 minutes and called a few people but was never able to get the system to check the bag to the next flight, even doing a manual tag failed - the system wouldn't record the tag number. Had to recollect and recheck bags at MAD. Had 2.5 hours. Only made the drop in time because I had priority tags and the MAD agents were expecting me.
The other connection was BCN-MAD-LHR-DXB. BCN-MAD on a different ticket and IB to LHR. Had problems again and ended up doing a manual tag. They offered the pick up and recheck, but I only had 100 mins for the connection, which promoted the manual tag. The bag made it through MAD alright, then got misplaced at LHR. (I was only in DXB for the day. The bag came down on the next flight - which was the same aircraft I was going back to LHR on...)