My favorite reference for these sorts of things that straddle physics and geometry is Frankel's "The geometry of physics".  He gives "Hodge's Theorem" in his chapter on harmonic forms.  It's a little more general than you need, because it applies to general $p$-forms, and you only need functions ($0$-forms).  So I'll specialize it to functions.

**Hodge's Theorem (for functions):** Let $M^n$ be a closed Riemannian manifold.  Then Poisson's equation
\begin{equation}
  \Delta \alpha = \rho
\end{equation}
(where $\alpha$ and $\rho$ are real-valued functions) has a solution if and only if $\rho$ has mean value $0$ on $M^n$:
\begin{equation}
  \int_M \rho\ \mathrm{vol}^n = 0.
\end{equation}

So, to apply this theorem to your question, we have
\begin{align}
  M &= \partial \mathscr{B} \\
  \alpha &= y, \\
  \rho &= \mathrm{const} - \left( p_{b ; d} \hat{h}^{bd} - R_{ac} Y^{a}_{1} Y^{c}_{2} + R_{adcb} Y^{d}_{1} Y^{c}_{2} Y^{a}_{2} Y^{b}_{1} \right). \\
\end{align}
Note that this is leaves out the $p'^a p'_a$ term in (1) from the original question; that term involves derivatives of $y$ other than the Laplacian, and Hawking & Ellis don't actually claim that it should be included in what is equal to a constant.