Being near the oven doesn't necessarily mean that your cabinets aren't dry - they're probably as dry as any pantry.
I doubt a cooler is going to be significantly better than a cabinet. Without ice/water, it's just an insulator, so it'll resist change in temperature, which would tend to make the temperature variation inside it a little more moderate than that in the rest of your kitchen. (It'd also lag behind - it'll stay cooler as your kitchen warms up, then stay warmer as your kitchen cools down.) But more importantly, it's sealed, so there's no airflow. This may cause it to end up more humid than the rest of the kitchen.
The best thing is probably just to use the best available cabinets - low and as far from the oven as possible. They shouldn't heat up all that much from stove and oven use, and I'm guessing you use the oven more often in the winter, when the whole room is cooler anyway. If your kitchen is still getting too warm, try using a fan to circulate air with the rest of the apartment while cooking. Of course, in your case, in San Francisco, even the summers aren't that warm. You should really be fine using the cabinets. Failing that, you can always just buy a standalone shelf or cabinet, call it your pantry, and put it a little farther away.
If you're still having problems with spices not keeping well, you might want to just try to buy smaller quantities (if you have somewhere that sells them in bulk), or grind them yourself instead of buying ground spices. I wouldn't be overly concerned about storing them without light, either; so many people do just fine with spice racks (clear glass jars) on the counter.
Finally, some foods can also handle being stored in the refrigerator. Really depends what you're worried about!