Observe that $Var(Y)=\sum_{i} (p_i-p_i^2)$ is a concave function of the $\mathbf p$ vector. Let us compute the gradient of this function as
\begin{align*}
\nabla_{\mathbf p} Var(Y) &= \mathbf 1-2\mathbf p
\end{align*}
Where $\mathbf 1$ is the all one vector. This is constrained optimization of concave function and so the optimal solution $\mathbf p^\ast$, such that $\sum_i p^\ast_i = \mathbb E [Y]$, satisfies for any $\mathbf p$ in the constrained domain,
\begin{align*}
&\nabla_{\mathbf p^\ast} Var(Y)^T (\mathbf p - \mathbf p^\ast) \leq 0
\end{align*}
This condition is standard and pretty intuitive if you think it means that the tangent plane at $\mathbf p^\ast$ needs to be above the function for all point in the constrained domain, concavity does the rest. For more information you can see any convex optimization material such as this one on page 11, having concavity means that $-f$ is convex and so it reverse the inequality. I don't actually know the name of this handy condition
So the only thing you need to show is that this means that $\mathbf p^\ast = c \mathbf 1$ is you solution for constant $c=\mathbb E [Y]/n$.
You can plug in everything to get
\begin{align*}
(\mathbf 1 - 2 c \mathbf 1)^T(\mathbf p - c \mathbf 1)&=(1-2c)\mathbf 1^T(\mathbf p - c \mathbf 1)\\
&=(1-2c)\sum_i (p_i-c)\\
&=(1-2c)\left( \sum_i p_i - nc \right)\\
&=(1-2c)(\mathbb E [Y] - \mathbb E [Y])\\
&= 0
\end{align*}
Which indeed satisfy the inequality and so you are right, having $p_1=p_2=\dots = p_n$ gives an optimal solution