The Schrödinger representation $(\Pi, L^{2}(\mathbb{R}))$ is a representation of the Heisenberg Lie algebra in $L^{2}(\mathbb{R})$. Here, the Heisenberg Lie algebra is the vector space $\mathbb{R}^{2}\oplus \mathbb{R}$ generated by $x,y$ and $z$ with Lie brackets defined by the rules: $$[x,y]=z, \quad [x,z]=[y,z] = 0.$$
I have seen this concept in some books, but it always appears in the context of matrix Lie algebras and matrix Lie groups. In this context, the definition of a representation is always given in the finite-dimensional case, which is not the case of $L^{2}(\mathbb{R})$. So, I would like to know: what is the definition of a representation of a Lie algebra in an inner product (or Hilbert) space?
Transferring my comments into an answer:
Given an inner product space, the group of linear transformations that preserve the inner product is a Lie group, and so like all Lie groups it has an associated Lie algebra. So a representation in that case would just be a Lie algebra homomorphism from your given Lie algebra to the associated Lie algebra of the inner product space. Furthermore, if your inner product space is finite dimensional and you pick a basis, you can even express its associated Lie group and Lie algebra as matrices. For instance in $\mathbb R^n$ with its standard inner product you just get the Lie group $\text{O}(n;\mathbb R)$.
If $V$ is finite dimensional and a basis is chosen, and if you want to be less specific and ignore the inner product, then you get the Lie group $\text{GL}(n;\mathbb R)$. But you get more information if you pay attention to the inner product: $\text{GL}(n;\mathbb R)$ has $\text{O}(n;\mathbb R)$ as a closed subgroup; and hence the Lie algebra of $\text{GL}(n;\mathbb R)$ has the Lie algebra of $\text{O}(n;\mathbb R)$ as a Lie subalgebra.
In infinite dimensional situations, similar things should happen if you set things up correctly: the "general linear" infinite dimensional Lie algebra contains the "orthogonal" (or "unitary") Lie algebra as a Lie subalgebra.