Closed-form of an integral involving a Jacobi theta function, $ \int_0^{\infty} \frac{\theta_4^{n}\left(e^{-\pi x}\right)}{1+x^2} dx $
This is a sequel to my comments to the question which was too long to fit in another comment.
We have the formulas for $\vartheta_{3}^{10}(q), \vartheta_{3}^{12}(q)$ from Topics in Analytic Number Theory by Rademacher (famous for proving an infinite series formula to calculate the number of partitions of a positive integer) on page 198: \begin{align} \vartheta_{3}^{10}(q) &= 1 + \frac{4}{5}\left\{\sum_{n = 1}^{\infty}\frac{2n^{4}q^{n}}{1 + q^{2n}} + \sum_{n = 1}^{\infty}(-1)^{n - 1}\frac{(2n - 1)^{4}q^{2n - 1}}{1 - q^{2n - 1}}\right\} + \frac{2}{5}\vartheta_{3}^{2}(q)\vartheta_{2}^{4}(q)\vartheta_{4}^{4}(q)\tag{1}\\ \vartheta_{3}^{12}(q) &= 1 + 8\sum_{n = 1}^{\infty}\frac{n^{5}q^{n}}{1 - q^{2n}} - 8\sum_{n = 1}^{\infty}(-1)^{n}\frac{n^{5}q^{2n}}{1 - q^{2n}} + \vartheta_{2}^{4}(q)\vartheta_{3}^{4}(q)\vartheta_{4}^{4}(q)\tag{2} \end{align}
Finding a general formula for $\vartheta_{3}^{k}(q)$ for even positive integer $k$ is a difficult problem but using the methods given in Rademacher's book it looks like it is possible to obtain such formulas at the cost of heavy symbolic manipulation for a specific $k$.
Update: I found one pattern in your formulas by using the substitution $x = K'(k)/K(k)$ so that when $x = 0$ then $k = 1$ and when $x = \infty$ then $k = 0$ and moreover $$\frac{dx}{dk} = -\frac{\pi}{2kk'^{2}K^{2}}$$ so that the integral of $\vartheta_{4}^{2n}(e^{-\pi x})/(1 + x^{2})$ is transformed into $$\int_{0}^{1}\left(\frac{2k'K}{\pi}\right)^{n}\frac{1}{K^{2} + K'^{2}}\frac{\pi}{2kk'^{2}}\,dk = \left(\frac{2}{\pi}\right)^{n - 1}\int_{0}^{1}\frac{k^{-1}k^{'(n - 2)}K^{n}}{K^{2} + K'^{2}}\,dk$$ and that explains (at least to some extent) the occurrence of $\dfrac{1}{\pi^{n - 1}}$ in your formulas.
Next it is easy to prove one of the formulas in $(14)$. We have $$\vartheta_{2}^{2}\vartheta_{4}^{2} = kk'(2K/\pi)^{2}$$ and hence $$\int_{0}^{\infty}\vartheta_{2}^{2}\vartheta_{4}^{2}\,dx = \int_{0}^{1}kk'\cdot\frac{4K^{2}}{\pi^{2}}\cdot\frac{\pi}{2kk'^{2}K^{2}}\,dk = \frac{2}{\pi}\int_{0}^{1}\frac{dk}{\sqrt{1 - k^{2}}} = 1$$ I wonder if similar technique can be applied to prove other formulas.
If $q = e^{-\pi x}$ then $dx = -\dfrac{dq}{\pi q}$ and interval $(0, \infty)$ changes to $(0, 1)$ and hence we can express the first integral of $(14)$ as $$\frac{1}{\pi}\int_{0}^{1}\vartheta_{2}^{4}(q)\vartheta_{4}^{2}(q)\,\frac{dq}{q} = \frac{16}{\pi}\int_{0}^{1}\psi^{4}(q^{2})\phi^{2}(-q)\,dq$$ Next $$\psi^{4}(q^{2}) = \sum_{n = 0}^{\infty}\frac{(2n + 1)q^{2n}}{1 - q^{4n + 2}}, \phi^{2}(-q) = 1 + 4\sum_{n = 1}^{\infty}\frac{(-1)^{n}q^{n}}{1 + q^{2n}}$$ I wonder if you can utilize the above Lambert series to prove that the desired integral is equal to $1$. It appears that if we express the integrand as a Lambert series then it can also be expressed as the logarithmic derivative of some product of theta functions and the integral can be evaluated. See this paper regarding some integrals related to theta functions (all of it was given by Ramanujan in his lost notebook).