Your approach has at least one mistake, since you define W using symbol w before you place assumptions on w[i,j], and more importantly because you have no assumptions of, say, realness of the y[i,j].
But if set up more suitably then I suspect that you may receive a result of FAIL from is, which doesn't help. Even this happens, it seems:
is((y22 - y12)^2>=0) assuming real;
is((y22 - y12)^2+b>=0) assuming b>=0, real;
is((y22 - y12)^2 + (y21 - y11)^2>=0) assuming real;
So even if you simplify as follows it may be that is has issues dealing with it.
K := simplify(Trace(simplify(Transpose(Y) . (d-W) . Y))):
collect(K,[w[1, 2],w[1, 3],w[2, 3]],Student:-Precalculus:-CompleteSquare);