I don't think you'd have a problem doing 40 miles on that bike; I've done that distance semi-regularly on a Schwinn Suburban, without any meaningful complaints. But then my other bike is also an upright (a '72 Campania Sport) so it might just be something I'm more used to.
To be honest, I'd probably ditch the straight MTB handlebar altogether and replace it with a curved North Road one, though. A lot more comfortable for this kind of bike, IMO.