Another comment: When you solve the linear system (probably with regularization if it is underdetermined) you can plot the rows of the matrix inverse on your grid. You can think of each row as integration weights for each basis function (spherical harmonic). If the system is well conditioned these weights should be smoothly varying, and kind of look like the spherical harmonic evaluated on the grid. If you instead get very large weights with alternating signs then the method is unstable for some reason, and the fit will be strongly affected by noise.