YUL has a pre-clearance for travel to USA but there is no pre-clearance in MIA.
You would have to clear the immigration in YUL and claim your bag.
Last time I was flying from YUL I was staying in Sheraton nearby - it was not expensive but that was in summer.