I have taken some hard cheeses onto backpacking trips quite successfully without spoilage, but I have not dared taking more than I can eat in about 3 days. Eggs I have not dared to take. I am interested in how long people have gone in arid climates before their cheese/eggs became inedible. I don't mind sweaty cheese or even some mold, but I do not care much about food poisoning in the backcountry.
Long time. Especially hard cheeses. You can just cut any mold off the edge that might creep up. Cheeses sealed in cheese wax (gouda) are a good bet.
I've had extra-sharp cheddar un-refrigerated in the AZ desert for 8+ days, in the rocky mountains for 15+ days with no issues (aside from sweat.)
Blocks last longer than a pile of shredded cheese.
Be smart. Keep an eye on it. If it smells foul, don't eat it.
With shells intact, raw eggs last surprisingly long.
In the Borneo rain forest (just below the equator = hot) we would get pallets of 300+ raw eggs shipped up to camp that we would store, un-refrigerated in the shade, for 30 days at a time. (This was after however long un-refrigerated in the truck, the shop, and the supply boat...)
Sure, there was some spoilage - but a very small percentage. Just crack them into a separate container first before tossing them in your dish.
Or use an old farmers test: put your raw eggs in a bucket of water, "If they sink, they're safe. If they float, they fail."
Other people suggest cracking the eggs into a sterilized lexan bottle (rinse with bleach first) and then freezing (or not). These reportedly last for several days. (<-I have not tried this).
As a distant last option -- they are doing some pretty decent things with powdered eggs these days...
Caveat: These are my personal experiences. I am sure there are some official FDA guidelines and other related official paranoia. Possibly even tails of death and disease from eating day old cheese. Fine. Follow those if you choose. Or step outside of commercial convention and open a world of gourmet back-country dining.
I've never tried it myself, but I met people trekking (sorry, tramping) in New Zealand who had pre-scrambled eggs with them, on the 5 day Heaphy track. They were cooked quite hard, and so could be easily carried in a freezer bag without worrying about breaking them, and then warmed up, or eaten as is.
It was only day 2, so perhaps they didn't expect to keep them for long, but I remember them looking a lot nicer than all dried nonsense I was eating at the time! I guess their shelf life would be down to the weather at the time.
Personal anecdotal experience:
I've gone 3 days with eggs in the backcountry but I live in the Rockies where it stays cool in the shade and night. I've been told if you keep a few eggs in a tin of flour that they'll keep for a week.