4. As shown in Figure 1, given a quadrilateral pyramid $P-ABCD$ with a base that is a square of side length 1, $PA=1$, and $PA \perp$ the base $ABCD$. Then the distance from the midpoint $E$ of $PB$ to the plane $PCD$ is ( ).
(A) $\frac{1}{2}$
(B) $\frac{\sqrt{2}}{2}$
(C) $\frac{\sqrt{2}}{4}$
(D) $\frac{1}{4}$
4. C.

Let $F$ be the midpoint of side $PC$. Then $EF$ is the midline of $\triangle PBC$, and the distance from point $E$ to plane $PCD$ is half the distance from point $B$ to plane $PCD$. The distance from point $B$ to plane $PCD$ is equal to the distance from point $A$ to plane $PCD$, which is the altitude from side $PD$ of $\triangle PAD$, i.e., $\frac{\sqrt{2}}{2}$. Therefore, the distance from point $E$ to plane $PCD$ is $\frac{\sqrt{2}}{4}$.