Spectrogram with square or non-square magnitude of STFT: power vs. magnitude
In the image you gave, the right-hand scale is in decibels (dB). So, essentially, the square turns into an affine scaling in the logarithm domain, which essentially yields the same image, at least the same relative dynamic range. So, in that case, it does not matter.

Aside, $x \to x^\alpha$ transformations with $x\ge 0$ (a positive signal, a magnitude spectrum, a spectrogram) are customary when signals have different orders of magnitude that cannot be caught by human eyes or ears: $\alpha &gt; 1$ puts emphasis on the largest components,   $\alpha &lt; 1$ relatively enhances smaller values, which is useful when you want to detect low-amplitude signals. 
Depending on whether you want to capture audio fingerprints, or perform subtle audio forensics, one or the other should be chosen. Such $\alpha$-power transformation are also useful in your other spectral subtraction question, What is the name of this very simple spectral subtraction technique?