The HDD would need to be physically attached to the subwoofer to damage it... As long as the HDD is at least 12" away you should have no problems at all. I'd worry much more about vibration than magnetic fields. Additionally if the case of your computer is steel or iron (not aluminum) then that'll also act as a shield for magnetic waves.
I'd think it safer to put it as far away as possible for vibration concerns, but my computer box (wood) is in physical contact with my 3x10" rack of subs, and no problems yet so I wouldn't really worry. My HDD is probably 10" from the closest speaker coil.