Second-order perturbation theory in an expanding universe : spherical harmonics expansion