Second-order $L^2$-regularity in nonlinear elliptic problems