A sequence of quadratic equations
Let's work backwards: given a final state, how many steps would it take to reach the beginning? Let the final state be represented by $r_1, r_2$ with $r_1 \le r_2$.
We can see that the quadratic before the final one must have been $$(x-r_1)(x-r_2) = x^2+(-r_1-r_2)x + r_1r_2$$
In order to have a sequence longer than $1$, it must be true that $$-r_1-r_2 \le r_1r_2 \tag 1$$
To get that quadratic, the previous quadratic must have been $$(x+r_1+r_2)(x-r_1r_2) = x^2 + (r_1+r_2-r_1r_2)x - r_1r_2(r_1+r_2)$$
In order to get a sequence longer than $2$, it must be true that $$r_1+r_2-r_1r_2 \le - r_1r_2(r_1+r_2) \tag 2$$
Taking it one more step, the following condition must also hold in order to get a sequence longer than $3$: $$(r_1r_2-r_1-r_2+r_1r_2(r_1+r_2)) \le (r_1r_2-r_1-r_2)(r_1r_2(r_1+r_2)) \tag 3$$
Finally, this last condition must also hold in order to get a sequence longer than $4$: $$-\left(r_{1}r_{2}-r_{1}-r_{2}+r_{1}r_{2}\left(r_{1}+r_{2}\right)\right)-\left(r_{1}r_{2}-r_{1}-r_{2}\right)\left(r_{1}r_{2}\left(r_{1}+r_{2}\right)\right)\le\left(r_{1}r_{2}-r_{1}-r_{2}+r_{1}r_{2}\left(r_{1}+r_{2}\right)\right)\left(r_{1}r_{2}-r_{1}-r_{2}\right)\left(r_{1}r_{2}\left(r_{1}+r_{2}\right)\right) \tag 4$$
In order to satisfy $(2)$, it must be true that $r_1 < 0$ or that $r_2 < 0$. Letting the $x$-axis be $r_1$ and the $y$-axid be $r_2$, this eliminates the first quadrant. In order to satisfy $(3)$, it must be true that $r_1 > 0$ or that $r_2 > 0$, eliminating the third quadrant. However, in order to satisfy both $(1)$ and $(4)$, $(r_1, r_2)$ can only be in the second and fourth quadrants. Therefore, there are no real $r_1, r_2$ that satisfy $(1), (2), (3), (4)$.
This then means that the maximum length of a sequence of the quadratic equations is $4$, obtained by setting $$a = r_1r_2-r_1-r_2+r_1r_2(r_1+r_2), b = (r_1r_2-r_1-r_2)(r_1r_2(r_1+r_2)$$
for any $r_1, r_2$ that satisfy $(1), (2), (3)$, and $r_1 \le r_2$.
Edit: The conditions $(1), (2), (3), r_1 \le r_2$ can be rewritten as $$-\frac{r_{2}}{r_{2}+1}\le r_{1}\le\frac{-\left(r_{2}^{2}+1-r_{2}\right)+\sqrt{\left(r_{2}^{2}+1-r_{2}\right)^{2}-4r_{2}^{2}}}{2r_{2}}$$ with $r_1 \le 0 \le r_2$
The equation $y=x^2 + px + q$ can be rewritten as $$y-\left(q-\frac{p^2}{4}\right)=\left(x-\left(\frac{-p}{2}\right)\right)^2$$ And so it is clear that this parabola's vertex is at the point $(\frac{-p}{2},q-\frac{p^2}{4})$. Therefore the process will terminate at step $n$ if $q_n-\frac{{p_n}^2}{4} > 0$.