Shelves can sag directly because there is too much weight for the support provided, or they can sag over time with the fatigue of certain wood products, like particle board, especially in high humidity conditions. So although particle board may hold up as well as plywood or real wood at the beginning, it actually has to be better supported for the same load over the long run. Also, sanding grade plywood will sag less than the same size of rough sheathing plywood.
There are two elements to determining how to make non-sag shelves. The thickness of the shelf itself (and what it is made of), and the distance between shelf supports. Unfortunately nowhere does there seem to be a simple set of shelving span tables, so I set about collecting the literature on the question and compiling my own set of non-sag span tables. For all the details click on the link to "Span Tables for Shelves". You can also locate my span table by looking up "Shelving" in the keywords list of the Nuts&Bolts.