If they didn't have the cheese? (and were kept dry) Theoretically forever. Although they'd get stale. Crackers, noodles, etc are all ways to preserve grains (which will also keep a few thousand years as long as they're kept dry.
But one you add dairy (butter, cheese, etc) the oils can go rancid, and the cheese by definition already has molds (cheese is just moldy milk). So they can go rancid or moldy fairly quickly without preservatives to inhibit mold or bacterial growth, and to slow the breakdown of the animal fats.
As little as a few hours to as long as a few weeks. Depends on how they were cooked, how dry they are kept, and the temp of how they're stored. Kept in an airtight container (glass or metal or glazed ceramic or porcelain that has been high fired... Which turns the surface to glass, glaze itself is glass... I differentiate because earthenware is porous and absorbs moisture), in the fridge (which is by nature moist, hence the airtight container... they'd keep the longest. In a humid warm house? The shortest.