The short time Fourier transform $S: L^2(\mathbb{R})^2 \rightarrow L^2(\mathbb{R}^2)$ can be defined as
$$S(g,f)(a,b):=\int_{\mathbb{R}}f(x) \overline{g(x-a)} e^{-i b x} dx.$$
Now a natural question would be to ask for the inverse:
For any $\gamma \in L^2(\mathbb{R})$ with $\langle g,\gamma \rangle \neq 0,$ we have formally an inverse given by
$$f(x) = \frac{1}{2 \pi \langle g,\gamma \rangle } \int_{\mathbb{R}^2} S(g,f)(a, b) e^{ib x}\gamma(x-a) da\ db$$
although this seems to me as a well-defined integral in $a$ (Cauchy-Schwartz), I don't see that the integral over $b$ is well-defined. Thus, I was wondering whether the integral over $b$ makes sense, too. Or whether there are more canonical spaces, such that everything here exists?
If the question is, why does your inversion formula holds, the intuition behind it is given by the following identity
$$ \int db e^{-ib(y-x)} = 2 \pi \delta(x-y) $$
which is valid in the sense of distribution. If you plug the above into your equation for $f(x)$ you obtain, indeed,
$$ f(x) = \frac{1}{\langle g,\gamma\rangle} \int da \,\,f(x) \overline{g(x-a)} \gamma(x-a) $$ and the inversion is proved changing variable of integration. If you want a more formal proof you can use similar arguments as those showing that the (standard) Fourier transform operator ${\cal F}$ is a unitary operator from $L^2(\mathbb{R})$ onto itself. In fact the integral representation of the Fourier operator only holds for functions in $L^1(\mathbb{R})$. This can be extended to an operator in $L^2(\mathbb{R})$ using:
$$ ({\cal F}f)(k) = \lim_{N\to \infty} \frac{1}{\sqrt{2\pi}} \int_{-N}^N dx \,\, e^{ikx} f(x) $$