Using rsync -e 'ssh -i "/some directory with spaces/identity"' causes rsync to try to execute ssh like:
execve("/usr/bin/ssh", ["ssh", "-i", "\"/some directory with spaces/identity\"", ...])
Which of course fails, because the quotes were to delimit the argument, not part of the filename. This makes it more difficult to use options with spaces and is inconsistant with the --rsync-path option, which uses sh to interpret the command.
I added single- and double-quote parsing to rsync's handling of the remote-shell command. Rsync doesn't use the shell to parse this string (since that could cause problems for the option-forwarding code). I decided to not include backslash parsing in order to (1) keep it simple and (2) avoid causing problems for cygwin users. I also decided to keep the quirk that tabs are not considered arg-breaking characters. This should give us very good backward-compatibility.