I think you need to double quote the message string:
$ ssh -p 29418 <server_name> gerrit approve --verified=-1 \
\'--message='This failed'\' \
12,1
The first level of quotes is discarded by the shell that is running
SSH, and then SSH just joins everything together into a single giant
string and ships it to Gerrit. Gerrit has to break that apart on
spaces, but it tries to honor '' around arguments when possible.
Putting \' and \' around the --message option makes your shell pass
a literal ' and ' to SSH, and then Gerrit can see these and keep
the whole message together as a single string.
Once the value is properly quoted, you should also be able to pass
a newline in the middle of the message:
$ ssh -p 29418 <server_name> gerrit approve --verified=-1 \
\'--message='Message with more than one line.
We needed two paragraphs here.'\' \
12,1