I'm gonna second Toobz' posts by saying, shorter boards aren't the answer, neither is not surfing.
From my own experience, it's just practicing correct posture everywhere... says he, sitting poke necked and slouched at his PC.

I've done 10 years of Pilates, and whilst I don't go to classes any more, I've managed to stave off three surgeries that were suggested when I had various upper and lower back injuries.
Like a lot of us, if I'm lazy I'll paddle with my chest on the board and look up with a crooked neck. When I think carefully about it, or my neck starts to hurt, I remember to arch from between the shoulder blades, keeping the neck as straight as possible, and looking up just with the eyes. From a distance, it looks like I'm still looking at the board in front of me, but it works. As does bending the knees to help engage the diaphragm and core. This is what stretches the upper spine, taking pressure off the compressed discs.
I also visit a chiro/osteo every 4 weeks, who isn't a surfer, but knows the benefits of surfing. In his opinion, if you keep form when you're paddling, you are doing your back more good than harm.
It's important to warm up, not stretch before a surf, but stretch very carefully after a surf. I use a fat foam roller when I get home to roll down the upper spine. Bliss....
Disclaimer: I'm also not a surgeon, chiro, physio or any other professional health person. This is just my experience.