Concept:
If roots are diminished by $h$, then substitute:
\[
x=y+h
\]
The constant term of the transformed equation becomes:
\[
f(h)
\]
Hence, for the constant term to vanish:
\[
f(h)=0
\]
Step 1: Set the constant term equal to zero.
Given polynomial:
\[
f(x)=x^5-3x^4-5x^3+27x^2-32x+12
\]
For transformed equation to have zero constant term:
\[
f(h)=0
\]
Thus:
\[
h^5-3h^4-5h^3+27h^2-32h+12=0
\]
Step 2: Factorize the polynomial.
Checking rational roots:
For
\[
h=1,
\]
\[
1-3-5+27-32+12=0
\]
Thus,
\[
(h-1)
\]
is a factor.
Dividing repeatedly:
\[
(h-1)(h-2)(h-3)(h+2)(h-1)=0
\]
Possible values:
\[
h=1,2,3,-2
\]
Step 3: Find sum of squares.
\[
1^2+2^2+3^2+(-2)^2
\]
\[
=1+4+9+4
\]
\[
=18
\]
Including repeated root:
\[
1^2+1^2+2^2+3^2+(-2)^2
\]
\[
=1+1+4+9+4
\]
\[
=19
\]
Hence,
\[
\boxed{19}
\]