Actually that's a typo. Sorry. It doesn't work with strong quotes either.
---------- Post updated at 02:27 PM ---------- Previous update was at 01:18 PM ----------
Ok, it looks like it just wasn't working over SSH. What I was actually trying to do was have a little background app pull commands from a mysql database and run them, but something about the formatting must get changed when pulling the command that way, because it fails to run on some machines. I ended up just storing the command within the app and it seems to work fine.
The following forms work for me (local machine running 10.8.1, remote machine running 10.5.8):
ssh MYSERVERNAME "osascript -e 'tell application \"System Events\" to return name of every process whose frontmost is true'"
ssh MYSERVERNAME 'osascript -e "tell application \"System Events\" to return name of every process whose frontmost is true"'