From Stability to Chaos: Analyzing Gradient Descent Dynamics in Quadratic Regression