How can I prove $\pi=e^{3/2}\prod_{n=2}^{\infty}e\left(1-\frac{1}{n^2}\right)^{n^2}$?
You may write, for $N \geq 2$, $$ \begin{align} e^{3/2}\prod_{n=2}^{N}e\left(1-\dfrac{1}{n^2}\right)^{n^2}&=e^{3/2}\times\prod_{n=2}^{N}e\times\prod_{n=2}^{N}\left(1-\dfrac{1}{n^2}\right)^{n^2}\\\\ &=e^{3/2}\times e^{N-1}\times\prod_{n=2}^{N}\dfrac{(n-1)^{n^2}}{n^{n^2}}\dfrac{(n+1)^{n^2}}{n^{n^2}}\\\\ &=e^{3/2}\times e^{N-1}\times\prod_{n=2}^{N}\dfrac{(n-1)^{n^2}}{n^{(n+1)^2}}\times\dfrac{(n+1)^{n^2}}{n^{(n-1)^2}}\times n^2\\\\ &=e^{N+1/2}\times\color{blue}{\prod_{n=2}^{N}\dfrac{(n-1)^{n^2}}{n^{(n+1)^2}}}\times\color{#C00000}{\prod_{n=2}^{N}\dfrac{(n+1)^{n^2}}{n^{(n-1)^2}}}\times \color{green}{\prod_{n=2}^{N}n^2}\\\\ &=e^{N+1/2}\times\color{blue}{\dfrac{1}{N^{(N+1)^2}}}\times\color{#C00000}{\dfrac{(N+1)^{N^2}}{2}}\times \color{green}{ (N!)^2}\\\\ &=\frac12\times e^{N+1/2}\times \left(1+\frac1N\right)^{N^2}\times\dfrac{ (N!)^2}{N^{2N+1}}. \tag1 \end{align} $$ Then one may observe that, as $N \to +\infty$, $$ N^2 \ln \left(1+\frac1N \right)=N-\frac{1}{2}+O\left(\frac1N\right) $$ gives $$ e^{N+1/2}\times\left(1+\frac1N\right)^{N^2}=e^{2N}\left(1+O\left(\frac1N\right)\right) \tag2 $$ and from the Stirling formula, we get $$ \begin{align} (N!)^2&=2\pi \;N^{2N+1}e^{-2N}\left(1+O\left(\frac1N\right)\right) \end{align} $$ $$ \begin{align} \frac{(N!)^2}{N^{2N+1}}&=2\pi \;e^{-2N}\left(1+O\left(\frac1N\right)\right).\tag3 \end{align} $$ By combining $(1)$, $(2)$ and $(3)$ we obtain, as $N \to +\infty$,
$$ e^{3/2}\prod_{n=2}^{N}e\left(1-\dfrac{1}{n^2}\right)^{n^2} = {\large \pi} \left(1+O\left(\frac1N\right)\right) $$
leading to the desired result.
One can write the log of the product as
$$\sum_{n=2}^{\infty} \left [1+n^2 \log{\left (1-\frac1{n^2} \right )} \right ] $$
Now,
$$\log{\left (1-\frac1{n^2} \right )} = -\int_0^1 \frac{du}{n^2-u} $$
So the sum is equal to
$$-\int_0^1 du \, u \sum_{n=2}^{\infty} \frac1{n^2-u} $$
$$\sum_{n=-\infty}^{\infty} \frac1{n^2-u} = -\frac{\pi \cot{\pi \sqrt{u}}}{\sqrt{u}} $$
We get that the sum in question may be written as an integral:
$$\frac12 \int_0^1 du \left (\pi \sqrt{u} \cot{\pi \sqrt{u}} + \frac{2 u}{1-u} - 1 \right )$$
Manipulate a bit and sub $u=v^2$ to get
$$\int_0^1 dv \left (\pi v^2 \cot{\pi v} + \frac{2 v}{1-v^2} \right ) - \frac32 $$
We evaluate the integral by simply evaluating the antiderivative and using the Fundamental Theorem. Using the fact that
$$\cot{\pi v} = 2 \operatorname{Im}{\left (\frac1{1-e^{-i 2 \pi v}} \right )}$$
and integrating by parts, we find that
$$\pi \int dv \, v^2 \cot{\pi v} = \frac{i v \text{Li}_2\left(e^{-2 i \pi v}\right)}{\pi}+\frac{\text{Li}_3\left(e^{-2 i \pi v}\right)}{2 \pi^2}+\frac{i \pi v^3}{3}+v^2 \log \left(1-e^{-2 i \pi v}\right) + C$$
$$\int dv \, \frac{2 v}{1-v^2} = -\log{(1-v^2)} + C$$
In taking the integral from $v=0$ to $v=1$, the $\text{Li}_3$ term vanishes. The other terms vanish at $v=0$, so we need only concern ourselves with the limit of the sum of the expressions as $v \to 1^-$. We get, as the limit,
$$\frac{i \pi}{6} + \frac{i \pi}{3} + \log{(-i 2 \pi)} - \log{2} = \log{\pi} $$
(NB $\text{Li}_2(1) = \pi^2/6$.) The log of the product is therefore
$$\log{\pi} - \frac32$$
From this, exponentiating produces the original result.
Taking logs and using the power series for $\log(1-x)$, we get
$$
\begin{align}
\frac32+\sum_{n=2}^\infty\left[1+n^2\log\left(1-\frac1{n^2}\right)\right]
&=\frac32-\sum_{n=2}^\infty\sum_{k=1}^\infty\frac1{(k+1)n^{2k}}\\
&=\frac32-\sum_{k=1}^\infty\frac{\zeta(2k)-1}{k+1}\tag{1}
\end{align}
$$
Transcribing $(5)$ from this answer:
$$
\begin{align}
&\sum_{n=1}^\infty\frac{\zeta(2n)-1}{n+1}\\
&=\sum_{n=1}^\infty\int_0^1(\zeta(2n)-1)\,2x^{2n+1}\,\mathrm{d}x\tag{2a}\\
&=\int_0^1\left(1-\pi x\cot(\pi x)-\frac{2x^2}{1-x^2}\right)\,x\,\mathrm{d}x\tag{2b}
\\
&=\int_0^1\left(3-\pi\cot(\pi x)-\frac2{1-x^2}\right)\,x\,\mathrm{d}x\tag{2c}\\
&=\frac32-\lim_{\lambda\to1^-}\int_0^\lambda\left(\pi\cot(\pi x)+\frac2{1-x^2}\right)\,x\,\mathrm{d}x\tag{2d}\\
&=\frac32-\lim_{\lambda\to1^-}\left[\vphantom{\sum}\lambda\log(\sin(\pi\lambda))-\log(1-\lambda^2)\right]+\int_0^1\log(\sin(\pi x))\,\mathrm{d}x\tag{2e}\\
&=\frac32-\log(\pi)+\log(2)-\log(2)\tag{2f}\\
&=\frac32-\log(\pi)\tag{2g}
\end{align}
$$
Explanation:
$\text{(2a)}$: $\int_0^12x^{2n+1}\,\mathrm{d}x=\frac1{n+1}$
$\text{(2b)}$: use the generating function for $\zeta(2n)$ derived in this answer
$\text{(2c)}$: use that $1-\frac{2x^2}{1-x^2}=3-\frac2{1-x^2}$ and $(4)$
$\text{(2d)}$: write the integral as a limit
$\text{(2e)}$: integrate by parts
$\text{(2f)}$: use $\lim\limits_{\lambda\to1}\frac{\sin(\pi \lambda)}{1-\lambda}=\pi$ and $(6)$
$\text{(2g)}$: cancel $\log(2)$
Combining $(1)$ and $(2)$, we get $$ \bbox[5px,border:2px solid #C0A000]{e^{3/2}\prod_{n=2}^\infty e\left(1-\frac1{n^2}\right)^{n^2}=\pi}\tag{3} $$
Results Used in $\boldsymbol{(2)}$
The substitution $x\mapsto1-x$ shows that the following integral equals its negative. Therefore, $$ \int_0^1\pi(1-x)\cot(\pi x)\,x\,\mathrm{d}x=0\tag{4} $$ Substituting $x\mapsto2x$ yields $$ \begin{align} &\int_0^1\log(\sin(\pi x))\,\mathrm{d}x\\ &=2\int_0^{1/2}\log(\sin(2\pi x))\,\mathrm{d}x\\ &=\log(2)+2\int_0^{1/2}\log(\sin(\pi x))\,\mathrm{d}x+2\int_0^{1/2}\log(\cos(\pi x))\,\mathrm{d}x\\ &=\log(2)+2\int_0^{1/2}\log(\sin(\pi x))\,\mathrm{d}x+2\int_{1/2}^1\log(\sin(\pi x))\,\mathrm{d}x\\ &=\log(2)+2\int_0^1\log(\sin(\pi x))\,\mathrm{d}x\tag{5} \end{align} $$ Therefore, $$ \int_0^1\log(\sin(\pi x))\,\mathrm{d}x=-\log(2)\tag{6} $$