Solved it
In case anyone else ever tries to do something like this and finds this post, the problem was this:
Somewhere along the line, something required to start up the ROM expected an interactive terminal, which is why it worked over SSH and locally, and even worked with running the PHP script from the terminal, but Nginx/Apache/another web server won't provide any interactive terminal.
It doesn't actually need any interactive terminal, so you can wrap the startup command inside a "script" command like this, to lie to it and trick it into believing it has an interactive terminal
<?php
$command = '/opt/retropie/supplementary/runcommand/runcommand.sh 0 _SYS_ snes "/home/pi/RetroPie/roms/snes/an-example-rom-obviously-not-the-real-one-but-lets-say-mario-or-something.sfc"';
$result = shell_exec("sudo -u pi script --return --quiet -c '".$command."' /dev/null");
?>
And that does the trick and starts the game up from a PHP web panel