Lorenzo,
You can never set the highest derivative as a boundary condition in an ODE. The highest derivative is always set by your equations. You can, however, solve for the correct boundary condition to get your answer:
The boundary condition that will give you y''[10]==1 can be found:
bc = Solve[x y[x] + x^2 y''[x] == 0 /. x -> 10 /. y''[10] -> 1,
y[10]][[1, 1]] /. Rule -> Equal
To get
y[10]==-10
Now you can solve your ODE:
s = NDSolve[{x y[x] + x^2 y''[x] == 0, y[1] == 0, bc}, y, {x, 1, 10}]
Regards,
Neil