I thought the only $n$ that this holds is $n=2$, but it wasn't.
First suppose that $n$ is not square-free. Then there exists some prime $p$ such that $p^2 \mid n$.
We now have $p^{n+1} \equiv 0 \pmod {p^2}$, so $p \not\equiv p^{n+1} \pmod {p^2}$.
This shows that $p^{n+1} \not\equiv p \pmod n$, which implies that $n$ must be square-free.
Hence $n$ is a product of distinct primes, and suppose for a prime $p$, $p \mid n$.
We have, by FLT, $a^p \equiv a \pmod p$.
Hence $a^{n+1} = a^{p (n/p)+1} \equiv a \cdot a^{n/p} \pmod p$, and we want to find $n$ such that:
$$a^{n/p} \equiv 1 \pmod p \text{ for all } p \nmid a \text{ and } p \mid n$$
By the existence of primitive roots, we can find $a'$ such that the multiplicative order of $a'$ is precisely $p-1$.
Thus we require $(p-1) \mid \dfrac n p$. By $\gcd (p,p-1)=1$, this is equivalent to showing that $(p-1) \mid n$.
I do not know how many numbers are there that satisfy the equation, but $42$ does:
$$42 = 2 \times 3 \times 7\text{ , and }1,2,6 \mid 42$$
and we do have $a^{43} \equiv a \pmod {42}$ for all $a$.
Easier examples include $n=2$ (trivial) and $n=6$ (not quite trivial). And also $1806$ as well.
EDIT: Found this on OEIS: A014117. There are no more. A (short) proof that this is finite is also in the [LINKS] section, compiled by Don Reble.