WordPress built-in compression of images? How well does it compare to Photoshop or Shortpixel?

The only true answer to this is to try an image in all three and compare the results. Photoshop and Shortpixel are off topic here, but also change with time so any answer would be out of date. You will need to look at non-WordPress resources to figure out the best optimisation strategy.

As for WordPress, it does nothing special as far as compression is concerned. You can adjust the quality % value of resized images when they’re JPEGs but that’s it. WordPress does not modify the uploaded image to try and optimise it.