Let $A_1$, $A_2$, $A_3$, … , $A_n$ be a set of points, and let $G=\displaystyle\frac{A_1+A_2+\ldots+A_n}{n}$.
Now take any circle centered at $G$. (If you're working in 3 dimensions, take a sphere centered at $G$ instead.) For any point $P$ on this circle, the value $A_1P^2+A_2P^2+\ldots+A_nP^2$ is constant.
To prove this, first note that, for any point $X$, we have $\vec{A_1X}+\vec{A_2X}+\ldots+\vec{A_nX}=n\vec{XG}$.
From this, you can conclude that $\vec{A_1G}+\vec{A_2G}+\ldots+\vec{A_nG}=0$.
So, for any point $X$, we have the following:
$$A_1X^2+A_2X^2+\ldots+A_nX^2=\left|\vec{A_1X}\right|^2+\left|\vec{A_2X}\right|^2+\ldots+\left|\vec{A_nX}\right|^2$$
$$=\left|\vec{A_1G}+\vec{XG}\right|^2+\left|\vec{A_2G}+\vec{XG}\right|^2+\ldots+\left|\vec{A_nG}+\vec{XG}\right|^2$$
$$=n\cdot\left|\vec{XG}\right|^2+2\cdot\vec{XG}\cdot\left(\vec{A_1G}+\vec{A_2G}+\ldots+\vec{A_nG}\right)+\left|\vec{A_1G}\right|^2+\left|\vec{A_2G}\right|^2+\ldots+\left|\vec{A_nG}\right|^2$$
$$=n\left|\vec{XG}\right|^2+\left|\vec{A_1G}\right|^2+\left|\vec{A_2G}\right|^2+\ldots+\left|\vec{A_nG}\right|^2$$
$$=n\cdot {XG}^2+A_1G^2+A_2G^2+\ldots+A_nG^2$$
So, when $XG$ is constant, $A_1X^2+A_2X^2+\ldots+A_nX^2$ is constant.
Sources: http://www.cut-the-knot.org/triangle/medians.shtml
Side note if you like physics:
Imagine $n$ Hookean springs, all with the same spring constant. The first spring connects $A_1$ to $X$, the second spring connects $A_2$ to $X$, and etc. In this setup, points $A_1$ through $A_n$ are fixed, but point $X$ is free to move. The potential energy of this setup is proportional to $A_1X^2+A_2X^2+\ldots+A_nX^2$. Since nature likes to minimize potential energy, this setup will come to rest when $A_1X^2+A_2X^2+\ldots+A_nX^2$ is at it's minimum. This setup will also come to rest when all the forces sum to $0$. At any point $X$, the sum of the forces will be $k\cdot\left(\vec{A_1}+\vec{A_2}+\ldots+\vec{A_n}\right)=k\cdot n\cdot XG$, where $k$ is the spring constant of each spring. This vector is sort of the opposite of a gradient vector, in the sense that it points to the direction of greatest decrease. If point $X$ moves perpendicular to this vector, there will be no change in the value of $A_1X^2+A_2X^2+\ldots+A_nX^2$. Ergo, you can move $X$ along a circle centered at $G$, and the value $A_1X^2+A_2X^2+\ldots+A_nX^2$ will remain constant.
Best Answer
In a triangle, the variables $a, b, c$ are typically reserved for the side lengths. To avoid confusion, I will use $r_a, r_b, r_c$ to denote the distances of a point $P$ from corresponding sides. Let $\Delta$ be the area of the triangle. For any point $P$ on or inside the triangle, we have
$$\sum_{cyc} a r_a = a r_a + b r_b + c r_c = 2\Delta\tag{*1}$$
Furthermore, if any triplets of non-negative numbers $x_a, x_b, x_c$ satisfies $(*1)$, there is a point $P$ on or inside the triangle with $(r_a, r_b, r_c) = (x_a, x_b, x_c)$.
Let $\displaystyle\;k = \frac{2\Delta}{\sum_{cyc} a^2} = \frac{2\Delta}{a^2+b^2+c^2}\;$, the sum of squared distances can be rewritten as
$$\begin{align}\sum_{cyc} r_a^2 &= \sum_{cyc} \left( (r_a - k a)^2 + 2k a r_a - k^2 a^2 \right)\\ &= \sum_{cyc} (r_a - k a)^2 + 2\left(\frac{2\Delta}{\sum_{cyc} a^2}\right)\left(\sum_{cyc} a r_a\right) - \left(\frac{2\Delta}{\sum_{cyc} a^2}\right)^2 \left( \sum_{cyc} a^2\right)\\ &= \sum_{cyc} (r_a - k a)^2 + \frac{4\Delta^2}{\sum_{cyc} a^2} \end{align}\tag{*2} $$ Since $\sum_{cyc} a (ka) = 2\Delta$, there is a point on or inside the triangle with $(r_a, r_b, r_c) = (ka, kb, kc)$.
The minimum of sum of squared distances is achieved at this point with value $\displaystyle\;\frac{4\Delta^2}{a^2+b^2+c^2}$.
Update
Please note that this particular point is known as symmedian point (or alternatively the Lemoine point or Grebe point). After I finished this answer, a search indicate this particular property has been asked before. Look at this question for more answers.