While I'm not big on backpacks when riding at all, for a 17" laptop I'd go with a backpack. That's just because of the shock absorption on a backpack. It'll be a gentler ride up there.
I have a 13 inch laptop and I don't mind it in my pannier because it isn't a snug fit in there. I can keep it in a neoprene sleeve that adds some padding and it has a little room to wobble inside the bag so it I hit a bounce hard it was wiggle room in the pannier and has the neoprene sleeve to cushion it. If I crammed a 17 inch laptop in there it would be a super tight fit and it would be super rigid with no give so every little bump would get transferred to the laptop.