Extended basis shell-model study of two-neutron transfer reactions