As pointed out in the comments, the inverse system is not realizable. However, it is possible to write down an expression for the impulse response of the inverse system. We want a system that results in a Dirac impulse when convolved with the given rectangular pulse $h(t)$. This can be done as follows. We delay the rectangular impulse by $T/2$, so it starts at $t=0$. Then we add an infinite number of delayed versions of it such that the result becomes a step function $u(t)$. Each delay is an integer multiple of $T$:
The system that achieves this has an impulse response given by
Now we have a step function, from which we can generate a Dirac impulse by taking the derivative. So the inverse system is given by the concatenation of the system with impulse response $f(t)$ given by $(2)$ and an ideal differentiator. The total impulse response of the inverse system is then
where $\delta'(t)$ is the distributional derivative of the Dirac impulse.
Clearly, the system with impulse response $g(t)$ given by $(3)$ is not realizable, but as a theoretical concept it is interesting, just like other ideal systems (e.g., ideal frequency selective filters, differentiators, Hilbert transformers, etc.).