Well, lets try using Vieta as you mention, and see what we have. Clearly $p(x)$ is monic. Further, for $n<3$ there is nothing to optimise. Else,
Coefficient of $x^{n-1}$ is $-\sum x_i=0$.
Coefficient of $x^{n-2}$ is $-\frac12(\sum x_i)^2+ \frac12\sum x_i^2=-\frac12$, and that’s all the conditions we have.
Coefficient of $x^{n-3}$ is, say, $C=\frac16(\sum x_i)^3-\frac12\sum x_i \cdot \sum x_i^2+\frac13\sum x_i^3=\frac13 \sum x_i^3$, so we seek to maximise $3C$.
So $p(x)$ is of the form:
$$p(x)=x^n-\tfrac12x^{n-2}-Cx^{n-3}+\dots$$
As we don’t have any more info, we note for all real roots, we need the $(n-3)$ th derivative of $p(x)$ also to have all real roots. This derivative is $$\frac{n!}{3!}x^3-\frac{(n-2)!}2 \,x-(n-3)!C$$
Equivalently $x^3-\dfrac3{n(n-1)}x-\dfrac6{n(n-1)(n-2)}C=0 $ has three real roots. This has non-negative discriminant iff
$$\Delta_3=4\left(\frac3{n(n-1)}\right)^3-27 \left(\frac6{n(n-1)(n-2)}\right)^2C^2\geqslant 0 \\ \implies \sum x_i^3=3C \leqslant \frac{n-2}{\sqrt{n(n-1)}}$$
It may be noted when one among the $x_i$ is $(n-1)\alpha$ and all others $-\alpha$, where $\alpha = \frac{1}{\sqrt{n(n-1)}}$, this maximum is indeed achieved.