That preference seems to be stored in com.apple.speech.synthesis.general.prefs
defaults write com.apple.speech.synthesis.general.prefs TimeAnnouncementPrefs -dict-add TimeAnnouncementsEnabled 1
or 0 at the end to turn it off. See
man defaults for more info.
Edit: Another thing that the shell script should do: if you haven't enabled this preference or another speech synthesis behavior since startup, you'll also need to launch the Speech Synthesis Server daemon:
otherwise, the option will show up as checked in System Preferences, but nothing will actually read the option when it is time to speak the time.