Often when planning food for a backpacking trip, I rely heavily on a very large amount of extremely varied trail-mix, and only throw in some jerky and a scant few "cookable" meals for variety. I haven't had (to my knowledge) any illness from this, but a friend expressed concern that the lack of variety would cause problems given the stress of the hike. Am I doing myself a disservice?
It takes more than 4-5 days to have problems from a limited diet, as long as you get enough of short-term things like salt (which is not normally a problem). Even so, I usually take some Flintstone chewables and dehydrated meals along to be healthy.
I would split your nutritional needs into long, medium, and short term.
Things like Vitamin C and Vitamin A are long term. A week or two of being short on them will not cause you problems during the trip, nor afterwards when you return to your normal eating patterns. You can essentially ignore them, which is kind of a bummer because this would be the easiest shortcoming to fix, by taking a multivitamin or other supplements.
Medium term would be fat and protein. Most people eat lots of protein - beef jerky, nuts in the trail mix, peanut butter - and get enough fat too. If for some reason you were eating meals like "pasta with butter but not cheese" and "white rice with vegetables" then perhaps you would run short of protein. (I say perhaps because grains do have some protein, and we typically need less than we think.) This would manifest itself mostly as feeling hungry too soon given the amount of work you're doing, and maybe not sleeping well. If it kept up long enough you might also be plagued with digestive problems. From reading books about long expeditions it seems to be a month of no fat and very little protein before dysentery sets in.
Short term your big worry is fibre. If you're not eating any fruits or veggies, and you've taken white flour bread and pasta, white rice etc, and no legumes, then you might not be getting any fibre. Depending on your age this can make you feel very uncomnfortable in just a few days. Throw in a little dehydration because you're sweating and drinking water isn't always to hand, and you could be feeling very jammed up.
The solution to fibre may be as close as your trail mix, if it's full of dried fruit. If you ignore the dried fruit, or if your trail mix is full of M&Ms, then you need to make sure you eat some vegetables. A dried soup mix might lead to nice lunches and take care of that for you, or you might try to cook more often. Or you could pay attention to those ads aimed at the 50+ crowd and bring along a fibre supplement - the kind you stir into water would probably be best.
If your concern is "I feel healthy and strong, my body works fine during the trip, but am I setting myself up for a long term health problem with the occasional week of deprivation" I would unequivocally say you are not. A bags-of-chips-on-the-couch habit that lasts for years can do that; a week without enough fibre or Vitamin A will not.
I don't think that a limited diet will cause you health issues. (caveat, I'm not a doctor...)
But, keep in mind that hiking is typically a strenuous activity. You need energy, and lots of it. You need short-term energy, medium-term, and long-term. A meal of whole-wheat pasta with some tuna or salmon from a pouch and some added olive oil and salt will give you short-term energy from the carbs, medium-term from the protein, and long-term from the fats, plus some salt to replenish what you've lost as you're staying hydrated. I can last a lot longer and the hills are less imposing when my diet is on-target. So, you probably won't get sick, but you may be short-changing yourself.
This would also depend on what your limited diet includes. You can live quite well on nothing but beans and rice for many months if needed. Trail mix and jerky, probably not so much.
One of the worst things you can eat on a trail is trail mix. Nuts take a very long time to digest and much needed calories are burned to digest them. Meat of any kind is also more difficult to digest and jerky is even worse. At least the meat or jerky provide you with much needed protein. Trail mix will fill your belly but it's not particularly nutritious or caloric for it's density.
Find some good beans and rice recipes. These are much more caloric per density and provide the carbs, sugars, fats, and protein you need.
Some people have great resistance for limited diet.
I've heard a lot of stories from the people I've met during mountaineering about their high mountain trips, where their diet was based mostly on semolina powder mixed with milk powder (something uneatable for me because of lactose intolerance). One of them said he had lost after about 1.5 weeks 10 kg weight... but he still was feeling good...
However, the caloric usage for middle-difficulty backpacking for a male is about 5000-6000 per day, so quite high (I've participated in measurements).