We further develop the theory of quantum finite-size effects in metallic nanoparticles, which was originally formulated by Hache, Ricard and Flytzanis [J. Opt. Soc. Am. B 3, 1647 (1986)] and (in a somewhat corrected form) by Rautian [Sov. Phys. JETP 85, 451 (1997)]. These references consider a metal nanoparticle as a degenerate Fermi gas of conduction electrons in an infinitely-high spherical potential well. This model (referred to as the HRFR model below) yields mathematical expressions for the linear and the third-order nonlinear polarizabilities of a nanoparticle in terms of infinite nested series. These series have not been evaluated numerically so far and, in the case of nonlinear polarizability, they can not be evaluated with the use of conventional computers due to the high computational complexity involved. Rautian has derived a set of remarkable analytical approximations to the series but direct numerical verification of Rautian's approximate formulas remained a formidable challenge. In this work, we derive an expression for the third-order nonlinear polarizability, which is exact within the HRFR model but amenable to numerical implementation. We then evaluate the expressions obtained by us numerically for both linear and nonlinear polarizabilities. We investigate the limits of applicability of Rautian's approximations and find that they are surprisingly accurate in a wide range of physical parameters. We also discuss the limits of small frequencies (comparable or below the Drude relaxation constant) and of large particle sizes (the bulk limit) and show that these limits are problematic for the HRFR model, irrespectively of any additional approximations used. Finally, we compare the HRFR model to the purely classical theory of nonlinear polarization of metal nanoparticles developed by us earlier [Phys. Rev. Lett. 100, 47402 (2008)].