Scott:
Neither of the developers use Windows, so we don't do much testing of the build process there. The error you are getting is because the MathJax package scripts expect to run in the bash shell, not the Windows command shell. You can tell pnpm to use bash via the command:
npm config set script-shell "C:\\Program Files\\Git\\bin\\bash.exe"
provided you have git installed (which I presume you do, if you are building MathJax from source).
Note, however, that there will still be problems, as the build scripts have other problems with Windows. As usual, the fact that Windows uses backslashes for directory separators, while everyone else uses forward slashes is one of the sources of issues, but also executing system commands requires special handling in node on Windows.
I spent some time working out the details, and provide the attached patch file that you should be able to apply to your cloned MathJax repository. It should make the build tools work for you in the Windows shell (provided the file makes it through Google's filtering to this forum post; if not, I'll make a new post with the test of the patch).
Alternatively, you could use Windows Subsystem for Linux (WSL), or Cygwin or something similar, which should let you use the build process as is.
Also, I'm not sure why you need to rebuild MathJax, as the @mathjax/src node package already includes the compiled and bundled versions, and if you want to make change to MathJax, it is probably better to subclass the needed parts and use this subclasses rather than editing the MathJax source directly.
In any case, here's the patch.
Davide