I have a counterexample. In particular, for all regular cardinals $\kappa$ such that there is no uncountable measurable cardinal below $\kappa$, there is a space $X$ that is the union of countably many boundaries of regular open sets but where $X$ is realcompact (and much more).

Let $\kappa$ be an uncountable regular cardinal. Let $D$ be a discrete space of cardinality $\kappa$ and let $D\cup\{\infty\}$ be space where $U\subseteq D\cup\{\infty\}$ is open if and only if $\infty\not\in U$ or $|D\setminus U|<\kappa$. Then $D\cup\{\infty\}$ is a $P_{\kappa}$-space. Furthermore, $D\cup\{\infty\}$ is $\kappa$-compact (by $\kappa$-compact we mean that every open cover has a subcover by less than $\kappa$-elements.). Thus $D\cup\{\infty\}$ is the one-point $P_{\kappa}$ $\kappa$-compactification of $D$. Give $(D\cup\{\infty\})^{\omega}$ the box topology and let $X\subseteq(D\cup\{\infty\})^{\omega}$ be the set of all sequences $(x_{n})_{n\in\omega}\in(D\cup\{\infty\})^{\omega}$ such that $x_{n}=\infty$ for sufficiently large $n$. Clearly $(D\cup\{\infty\})^{\omega}$ and $X$ are $P_{\kappa}$-spaces.

Let $X_{n}=\{(x_{i})_{i\in\omega}\in X|x_{n}=\infty\}$. Then each $X_{n}$ is a closed subset of $X$, but $X=\bigcup_{n}X_{n}$. Now let $\{A,B\}$ be a partition of $D$ such that $|A|=|B|=\kappa$. Take note that $A,B$ are open subsets of $D\cup\{\infty\}$ and $A\cup\{\infty\}$ is a closed subset of $D\cup\{\infty\}$.

Let $U_{n}=\{(x_{i})_{i\in\omega}\in X|x_{n}\in A\}$ and let $C_{n}=\{(x_{i})_{i\in\omega}\in X|x_{n}\in A\cup\{\infty\}\}$. Then $U_{n}$ is an open set and $C_{n}$ is a closed set. Furthermore, it is easy to check that $C_{n}^{\circ}=U_{n}$ and $\overline{U_{n}}=C_{n}$. Therefore $C_{n}$ is a regular closed set with $\partial C_{n}=C_{n}\setminus U_{n}=X_{n}$. We therefore conclude that $\bigcup_{n}\partial C_{n}=\bigcup_{n}X_{n}=X$.

On the other hand, the space $X$ is often much more than simply realcompact. We take note that the product of finitely many $\kappa$-compact $P_{\kappa}$-spaces is $\kappa$-compact (the proof of this is a straightforward generalization of the proof of the fact that the product of finitely many compact spaces is compact). Let $Y_{n}=\{(x_{i})_{i\in\omega}\in X|x_{i}=\infty\,\textrm{for}\,i\geq n\}$. Then $Y_{n}\simeq(D\cup\{\infty\})^{n}$, so $Y_{n}$ is $\kappa$-compact. Since $X=\bigcup_{n}Y_{n}$, we conclude that $X$ is $\kappa$-compact as well.

Let $X$ be a completely regular space. The Baire $\sigma$-algebra is the smallest $\sigma$-algebra such that every continuous function $f:X\rightarrow\mathbb{R}$ is measurable. If $X$ is a completely regular space and $\mathcal{M}$ is the Baire $\sigma$-algebra on $X$, then $X$ is realcompact if and only if each $\sigma$-complete ultrafilter $\mathcal{U}\subseteq\mathcal{M}$ is of the form $\{R\in\mathcal{M}|x\in R\}$ for some $x\in X$. Take note that if $X$ is a $P$-space, then the Baire $\sigma$-algebra is precisely the collection of all clopen sets on $X$.

$\mathbf{Proposition}$ Suppose that $\kappa$ is an uncountable regular cardinal such that there does not exist a measurable cardinal less than $\kappa$. Then every $\kappa$-compact $P_{\kappa}$-space is realcompact.

$\mathbf{Proof}$
Suppose that $\kappa$ is an uncountable regular cardinal such that there does not exist a measurable cardinal less than $\kappa$. Let $X$ be a $\kappa$-compact $P_{\kappa}$-space, and let $\mathcal{U}$ be a $\sigma$-complete ultrafilter on the Baire $\sigma$-algebra $\mathcal{M}$ (which coincides with the algebra of all clopen sets). Then since $\kappa$ is not greater than the first measurable cardinal if one exists, we conclude that the ultrafilter $\mathcal{U}$ is $\kappa$-complete. Since $X$ is $\kappa$-compact, and each intersection $\bigcap_{i\in I}C_{i}$ is non-empty whenever $|I|<\kappa$ and $C_{i}\in\mathcal{U}$ for $i\in I$, we conclude that the intersection $\bigcap\mathcal{U}$ is non-empty. Let $x\in\bigcap\mathcal{U}$. Then $\mathcal{U}\subseteq\{R\in\mathcal{M}|x\in R\}$. Therefore since $\mathcal{U}$ and $\{R\in\mathcal{M}|x\in R\}$ are ultrafilters, we conclude that $\mathcal{U}=\{R\in\mathcal{M}|x\in R\}$. Therefore the space $X$ is realcompact. $\mathbf{QED}$

We finally conclude that if $\kappa$ is an uncountable regular cardinal which does not exceed the first measurable cardinal (if one exists), then the space $X$ described above is a realcompact $P_{\kappa}$-space which is the union of the boundaries of countably many regular closed sets.