It may actually pay off for Trump if he can convince some Bernie supporters to vote for him, if Hillary is the nominee.
He’ll have to avoid antagonizing Bernie supporters, that’s a tough constraint to operate under. And Bernie has nothing to lose- just ‘taking on’ Trump is enough. He won’t be after Hillary at all- just Trump.
He ‘ll be the darling of the Dem Party just for showing up.
Heck, Hillary might just want to join in for a 2 (plus the moderators) on 1 fight!
Trump needs to say something like “Bernie is a worthy opponent and he should be the Dem nominee, however Bernie will be screwed over by the Dem party much like the GOP tried to screw me. Bernie and I are the only two true outsiders to take on the corrupt politics of Washington”. That comment could endear Trump to HUGE numbers of Bernie voters come election time.