We examine the structure and stability of spherical accretion flows onto compact objects, with a cooling function of the form L is-proportional-to rho(beta-alpha)p(alpha). The dependence of the flow structure and stability on the accretion rate M', the form of the cooling function, and the ratio of specific heats (gamma) of the accreting material is considered. The flows become more extended as M is decreased. The cooling function has a significant effect on the extended structure of settling solutions with gamma = 5/3. In contrast, the extended structure of settling solutions with gamma = 4/3 is nearly independent of the form of the cooling function. For both gamma = 4/3 and gamma = 5/3, radial shock oscillations in the fundamental and first overtone modes are destabilized in spherically extended accretion envelopes. In envelopes with gamma = 5/3, beta = 2, alpha = 1/2, nonradial shock oscillations with l > 1 are strongly damped when the shock thickness x(s0) exceeds about 0.1-lambda(l) where lambda(l) is the wavelength of the perturbation. Nonradial oscillations with l = 1 are unstable for x(s0) greater-than-or-similar-to 2r* where r* is the radius of the compact object, although the growth rate is slower than for radial oscillations. We discuss the application of these results to postsupernova neutron star accretion flows and to luminosity oscillations in AM Her objects. For radial oscillations of moderately extended white dwarf accretion envelopes, there is good correspondence between our linear perturbation solutions and the nonlinear numerical models of Imamura & Wolff. Postsupernova neutron star accretion flows are marginally unstable against radial shock oscillations. The nonlinear evolution of these oscillations may be an important aspect of the emergence of the neutron star from the accretion envelope.