Should be:
ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/sublime
Notice I removed the tilde (~). Tilde (~) in Unix refers to your user’s home directory, so your source was correct, but the second argument was placing the link in /Users/[your username]/usr/local/bin/ which is not included in $PATH.
In your note, you said you tried removing the quotes from the source argument. If you remove the quotes, you need to be sure to escape the space character as follows:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
That should work as well.