Is it possible to recover a waveform from spectrograms of magnitude *and* phase?
Real/imaginary or modulus/phase are two representations of a complex number that carry the same level of information. Then, a STFT is a redundant mapping from a space of functions over a 1D variable (time) onto a space of functions over a 2D variable (time and frequency). Under mild conditions on the window, there are an infinity of inverses, due to the redundancy. In the continuous setting, the analysis ($a$) and synthesis ($s$) windows only need to overall a little (more pedantic: $0 &lt; \int a(t).s(t)dt &lt;+\infty$). In the discrete form, this can be a little more involved, yet there are several optimized inverses for "almost" every sound redundant analysis filter-bank).

So, if for each point of the $(t,f)$ plane, you have the magnitude in the phase, you can recover the waveform (apart possibly at the extremeties). A side effect of the huge redundancy, inversion even remains (approximately) possible under mild conditions if you only have the modulus or the phase.