I’m pretty sure pizza will spoil in about two to three game days. I don’t have the resources in my current save to test it, but if I can scrounge up the missing components I’ll leave a slice in my pocket for a while to test it and post back with results.
Edit: It just occurred to me to check this against the wiki instead of fruitlessly searching for the missing ingredients in my saved game. Pizza expires exactly 48 hours after cooking.
Source: http://www.wiki.cataclysmdda.com/index.php?title=Pizza