Consider:
$$a w^Tw + b^T w + c = 0 $$
I would like to find a vector $w \in \mathbb{R}^D$ that satisfies the above equation. I realize that I need to choose D numbers to satisfy 1 equation, so my intuition (from linear algebra) tells me that there might be an infinite set of solutions for this (1 equation D unknowns). Thus, I thought that maybe additional constraints are needed. I am honestly not too worried about which one to choose as long as it satisfies the equation. However, if I really had to choose a criterion to choose a $w$ I would first require it to be real vector and perhaps choose $w$ closest to some other fixed (aprior chosen) $x$ (say for simplicity closest to the origin $x=0$). So the additional constraint is:
$$ min_w \| w - x\|^2 $$
or even
$$ \| w - x\|^2 = 0 $$
another constraint could be (normalized vector) is also good:
$$ \| w \|^2 = 1 $$
I mostly care to satisfy the "generalized quadratic", the additional constraint is there just incase its needed (no complex number solutions).
Also Ideally I'd like to implement the solution in a maths program, for example, python or matlab.
If $a=0$, let $w=\frac{-cb}{\left\|b\right\|^2}$
WLOG, assume that $a>0$
Let's try to complete the square, Note that your equality is just $$\left(\sqrt{a}w+\frac{1}{2\sqrt{a}}b\right)^T\left(\sqrt{a}w+\frac{1}{2\sqrt{a}}b\right)+c-\frac{b^Tb}{4a}=0$$
$$\left\|\sqrt{a}w+\frac{1}{2\sqrt{a}}b\right\|^2=\frac{b^Tb}{4a}-c$$
Now, if the RHS is nonnegative, you can choose $$\sqrt{a}w+\frac{1}{2\sqrt{a}}b=v$$
where $v$ satisfies $$\left\|v\right\|^2=\frac{b^Tb}{4a}-c$$
and solve for $w$.
For instance, you can choose $v=\left(\sqrt{\frac{b^Tb}{4a}-c}\right)e_i$ and $$w=-\frac{b}{2a}+\frac{v}{\sqrt{a}}$$