People are forgetting that if Weber retires before his contract ends, it won't be the Habs that will be slapped with the cap bill - it will be the Preds. His contract is bad, but it's not that bad for the Habs because of that... it's potentially quite bad for Nashville though.
Technically incorrect. Both can be hit with the bill; it's just that they have separate bills. Nashville's is hideously large. Montreal's is relatively small, but it's been building up.
If Weber retired at the end of this year, the Habs would have a $8,285,714 cap advantage credit to take care of, spread over the remaining eight years of his contract (or, a little over $1.03m/yr in cap hit). However, since subsequent years (the 2018-2019 season and beyond) have him earning below his cap hit, that cap advantage credit gets whittled away a bit (the difference is $1,857,143 for that season plus the three after it), so it's to Montreal's benefit for him to delay his retirement. After five seasons (not counting this one), the problem for Montreal pretty much goes away entirely (his actual pay in that fifth season drops to $3m, making a $4.8m cap difference, which nicely swallows any remaining advantage credit with room to spare).
Nashville, OTOH, would be best served by him either retiring
immediately, or (ideally) playing out every year of his contract. They already have just shy of three times that cap advantage credit already built up ($24,571,428!), and that'll be spread out over however many years are left on Weber's contract when he retires. For example, at the end of this season it'd be about $3.07m/yr for eight years; next season it's $3.51m/year for seven years, season after that $4.1m/year for six years, and so forth. Yes, that does mean that if Weber retires the season before his very last one on his contract, Nashville would ostensibly have a $24.5m cap penalty for that one year. (I suspect that the Preds would have a long discussion with the NHL about mitigating that before it comes to that, tho. My bet is that they take the penalty, but spread it out over the number of years that were left on Weber's contract when he was traded (10), for a ~$2.46m/year penalty for a decade.)
So the Habs do have something to worry about, but it gets overlooked because of the extreme disaster potential for the Preds and because if he plays 'till he's 37 the Habs are basically fine.