This is the Gauss-Legendre algorithm non homogeneous version for the elliptic modulus k. That is, let
$\, a_n = k(q_n) = (\theta_2(q_n)/\theta_3(q_n))^2 \,$ where $\, q_n = \exp(-\pi 2^n). \,$
We have $\, a_{n+1} = 4 q_n + O(q_n^3). \,$
Legendre used the following:
$\, k_{n+1} = (1 - k'_n)/(1 + k'_n) = k_n^2/(1 + k'_n)^2 = (1 - k'_n)^2/k_n^2 \,$ where $\, 1 = k_n^2 + k_n'^2. \,$
The AGM of Gauss is
$\, a_{n+1} \!=\! \frac12(a_n \!+\! b_n), $
$ b_{n+1} \!=\! \sqrt{a_n b_n}, \, $
$ c_{n+1} \!=\! \frac12(a_n\!-\!b_n). \,$
The connection is $\, k_n = c_n/a_n, \, k_n' = b_n/a_n. \,$
For more details, you can read the standard book Pi and the AGM by Borwein and Borwein.
By the way, the recursion as written
$\, a_{n+1} = (\sqrt {1 - a_n^2} -1)^2/a_n^2, \,$
is not good from a numerical point of view. The subtraction of two numbers nearly equal causes drastic loss of significance. The equivalent recursion
$\, a_{n+1} = a_n^2 / (1 + \sqrt {1 - a_n^2})^2 \,$ does not suffer from significance loss.