Either bike would be fine. I rode the full trip on a KLR. I have ridden shorter sections of this trip on my KTM 450. The 450 is a lot more fun in the hard sections, but it would be hell on a 3-4 day 200+ mile/day ride.
There was nothing that was close to too hard for the KLR. But I did have trouble in the water in Monticello Canyon with the carb breather hose being under water. The bike wouldn't run and I had to pull the hose up.
Unfortunately I got it too close to the exhaust pipe and it melted closed. So bike doesn't run again. I ended up just cutting it off above where it melted and have been running that way for 4 years now.