Physical insights from the spectrum of the radio halo in MACS J0717.5+3745