We are given that \( y = \log x \), so we first calculate the first and second derivatives of \( y \) with respect to \( x \).
First derivative:
\[
\frac{dy}{dx} = \frac{1}{x}
\]
Second derivative:
\[
\frac{d^2y}{dx^2} = -\frac{1}{x^2}
\]
Now, substitute these values into the expression \( x^2 \frac{d^2y}{dx^2} + 3x \frac{dy}{dx} + y \).
At the point \( \left( \sqrt{e}, \sqrt{e} \right) \), we have:
\[
x = \sqrt{e}, \quad y = \log x = \log \sqrt{e} = \frac{1}{2}, \quad \frac{dy}{dx} = \frac{1}{\sqrt{e}}, \quad \frac{d^2y}{dx^2} = -\frac{1}{e}
\]
Substitute these into the expression:
\[
x^2 \frac{d^2y}{dx^2} + 3x \frac{dy}{dx} + y = (\sqrt{e})^2 \cdot \left( -\frac{1}{e} \right) + 3 \cdot \sqrt{e} \cdot \frac{1}{\sqrt{e}} + \frac{1}{2}
\]
\[
= e \cdot \left( -\frac{1}{e} \right) + 3 \cdot 1 + \frac{1}{2}
\]
\[
= -1 + 3 + \frac{1}{2} = 0
\]
Thus, the value of the expression is \( 0 \), and the correct answer is option (1).