Kinetic Simulations of Cosmic-Ray-modified Shocks. II. Particle Spectra