Let $S(x) = \left[P\right]^2(x)$ be a polynomial of degree $(2m)$ in $x$. Then, in terms of the Heaviside-step function $u$, the coefficient of the $l^\text{th}$ term of $S(x)$, $s_l$, is
$$s_l = \left[\sum_{n=0}^{m-\left|l-m\right|} a_{ (l- n - (l-m )\,u(l - m)) }\,a_{ [ ( n + (l - m )\,u(l - m))] } \right].
$$
For some $m = 0,1,2,\ldots$, let
$$P(x)= \sum_{k=0}^m a_k\,x^k. $$
Further, let
\begin{align*}
S(x)
&=
\left[\sum_{k=0}^m a_k\,x^k\right]^2
\end{align*}
Then, expanding terms, we have
\begin{align*}
S(x)
&=
\left[a_0 \, a_0\right]x^{0}
&& (l=0)
\\
&+
\left[a_1 \, a_0 + a_0 \, a_1\right]x^{1}
&& (l=1)
\\
&\qquad\qquad\qquad \vdots
\\
&+
\left[
a_{m-1} \, a_{0} + a_{m-2} \, a_{1}+ \cdots
+ a_{1} \, a_{m-2} + a_0\,a_{m-1} \right]x^{m-1}
&& (l=m-1)
\\
&+
\left[
a_{m } \, a_{0} + a_{m-1} \, a_{1}+ \cdots
+ a_{1} \, a_{m-1} + a_0\,a_{m } \right]x^{m }
&& (l=m )
\\
&+
\left[
a_{m } \, a_{1} + a_{m-1} \, a_{2}+ \cdots
+ a_{2} \, a_{m-1} + a_1\,a_{m } \right]x^{m+1 }
&& (l=m+1 )
\\
&\qquad\qquad\qquad \vdots
\\
&+
\left[a_{m-1} \, a_m + a_{m} \, a_{m-1}\right]x^{2\,m-1}
&& (l=2m-1)
\\
&+
\left[a_m \, a_m\right]x^{2\,m}
&& (l=2m)
\end{align*}
Ultimately, there is structure here. The number of summands in the coefficient of each term is given by a translated and reflected absolute value function of $\ell$. Further, the subscript in the first coefficient is found with the use of a Heaviside step function $u$. After some toil, it can be shown that
\begin{equation}
\left[S\right]^2(x)
=
\sum_{l=0}^{2m}x^l\,\sum_{n=0}^{m-\left|l-m\right|} a_{ (l- n - (l-m )\,u(l - m)) }\,a_{ [ ( n + (l - m )\,u(l - m))] }
.
\end{equation}