Solution (source code)

= Solution

Take $X=Y=\ell^2$ and define
$$
S(x_1,x_2,\ldots)=
\left(x_1,\frac{x_2}{2},\frac{x_3}{3},\ldots\right).
$$
This is bounded and injective. Its inverse on $\operatorname{im}S$ is not continuous: for the standard unit vectors $e_n$,
$$
\boxed{\|Se_n\|_2=\frac1n\longrightarrow0,
\qquad
\|S^{-1}(Se_n)\|_2=\|e_n\|_2=1.}
$$