Let $R_n=\mathbb{C}[q_1, \ldots, q_n, p_1, \ldots p_n]$ be a polynomial algebra over complex numbers with even number of variables. Then $R$ admits Poisson bracket defined on linear functions as follows $$ \{p_i, q_j\} =\delta_{ij},\\ \{q_i, q_j\}=0,\\ \{p_i, p_j\}=0. $$ and extended to all polynomials by Leibniz's rule. Consider $R_n$ as (infinite dimensional) Lie algebra with such bracket.
I want to find non-trivial (and even interesting) examples of finite dimensional Lie subalgebras containing polynomials of degree at least 3.
Set $P_n=\mathbb{C}[q_, \ldots, q_n]$, if $v=\sum_{i=1}^n v_i \partial_i \in \operatorname{Der}(P_n)$ is a derivation with polynomial coefficients $v_i \in P_n$ then $\sigma(v)= \sum_{i=1}^n v_i p_i \in R_n$ and it is easy to check $$ \sigma([v_1, v_2])=\{\sigma(v_1), \sigma(v_2)\}. $$
So, a special case of the question is finding a finite dimensional Lie algebra of polynomial vector fields on an affine space, containing at least one vector field with at least one quadratic coefficient.
If $n=1$ then $L=<\partial, q \partial, q^2 \partial>$ seems to be a example of vector fields, giving the following 3-dimensional subalgebra $K=<p, qp, qp^2>$ of the Poisson algebra. Are there any other examples for $n=1$?
This example can be generalized to any $n$. The linear span of $\partial_i$, $q_i \partial_j$ and $q_i E$, where $E=\sum_i q_i \partial_i$, generate Lie algebra $sl(n+1, \mathbb{C})$. Moreover, this algebra is maximal: http://math.univ-lyon1.fr/~ovsienko/Publis/LecLMP.pdf
Hence, we can embed $gl(n, \mathbb{C})$ into $R_{n}$ by embedding it first in $sl(n+1, \mathbb{C})$.
Another way to embed $gl(n, \mathbb{C})$ is to embed it into $sp(2n, \mathbb{C})$ and notice that symplectic Lie algebra is realized inside $R_{2n}$ by quadratic polynomials. So, this not an example of what I'm looking for.