Write $a_i = 1 + b_i$ and define
$$ \begin{align*}
e_1 &= \sum_{i=1}^{n} b_i, &
e_2 &= \sum_{1 \leq i < j \leq n} b_i b_j.
\end{align*} $$
What we need to prove is $e_1 \leq n$. To this end, note that the equality yields
$$\begin{align*}
n + e_1
= \sum_{i=1}^{n} (1 + b_i)
= \prod_{i=1}^{n} (1 + b_i)
\geq 1 + e_1 + e_2.
\end{align*}$$
This implies $e_2 \leq n - 1$. We also observe:
Claim. $b_{n-1} \geq 1$.
Proof. Assume otherwise. Then $b_i = 0$ for all $i < n$, hence
$$n + b_n = \sum_{i=1}^n (1 + b_i) = \prod_{i=1}^{n} (1 + b_i) = 1 + b_n. $$
This contradicts the condition $n \geq 2$.
Using this observation, we have
$$ \begin{align*}
n \geq e_2 + 1
&\geq \sum_{i=1}^{n-2} b_{n-1} b_i + (b_{n-1}b_n + 1) \\
&\geq \sum_{i=1}^{n-2} b_i + (b_{n-1}b_n + 1) \\
&= \sum_{i=1}^n b_i + (b_{n-1} - 1)(b_n - 1)
\geq e_1.
\end{align*} $$
as desired. Furthermore, the equality holds if all the intermediate inequalities hold true. A moment of thought reveals that they hold precisely when
$$ b_1 = \ldots = b_{n-2} = 0, \qquad b_{n-1} = 1, \qquad b_{n-1} = n-1, $$
or equivalently, $(a_1, \ldots, a_n) = (1, \ldots, 1, 2, n)$.