The equation of any of the planes can be written as
$$ \newcommand{x}{\mathbf x}\newcommand{v}{\mathbf v}\newcommand{c}{c}
\x \cdot \v_i + \c_i = 0 $$
where $\x$ is the set of coordinates of a point on the plane,
$\v_i$ is the normal vector to the plane, and $\c_i$ is a constant.
You can find $\c_i$ by evaluating $-\x \cdot \v_i$ where $\x$ is set to the coordinates of the known point on the plane.
The distance from a point $\x$ to the plane is
$$
\frac{\lvert\x \cdot \v_i + \c_i\rvert}{\lVert\v_i\rVert}
$$
and the square of the distance is therefore
$$
f(\x) = \frac{1}{\lVert\v_i\rVert^2}
\left((\x \cdot \v_i)^2 + 2 c_i (\x \cdot \v_i) + c_i^2\right).
$$
This comes down to a quadratic polynomial over the coordinates of $\x.$
Add together the polynomials from all planes and you still have
a quadratic polynomial over the coordinates of $\x$, which is to be minimized.
If we represent the vectors by column vectors of coordinates,
then $(\x \cdot \v_i)^2$ is $(\x^T \v_i)^2$ in matrix notation,
and
$$ (\x^T \v_i)^2 = (\x^T \v_i)(\v_i^T \x) = \x^T A \x $$
where $A = \v_i \v_i^T.$
So $f(\x)$ is a quadratic form, which may help.