Your allergies eliminate all the easy, cheap, and largely available food you'll find along the route. I can only speak for the AT here, but I assume access to food stores is harder along the PCT.
Well, it sounds to me like you need to fully explore your options. I found when I thru-hiked I focused so much calories I totally forgot about nutrition. Nutrition (and I don't mean a multi-vit. or tons of balance bars) is best found in whole, unproccessed foods. You're in luck with your allergies since the abundance of crappy sports foods are automatically eliminated.
After my hike I re-read Ray Jardine's ideas about nutrition. There's a lot to be said for the convienence of drop-in-a-boiling-pot-and-ready-in-minutes-meals, but those meals have been processed to a point where the integrity of the food is sacrificed, lost, and replaced with less beneficial nutrients for "instant-ness".
Foods I would pre-prepare and live off of as staples on your hike (just like making your own gear, making your own food on your hike can be just as personally rewarding):
-Muesli (raw cereal): This is the easiest way to start your day–no cooking. Mix raw whole grain oats,any seeds (flax, pumpkin, sunflower), any dried fruit (currants, raisins, cranberries, and any thing else you want–just make sure to mix a bunch of different mixes to satisfy your need for diversity on trail
-Granola: Canola oil, honey, oats or other flaked grains (kamut, spelt, triticale), shredded coconut, and spices. Easy and so tasty as a daily snack.
-dried fruit: ideal as that sugar boost during the day when energy is fading.
-whole grain pastas:corn, quinoa, kamut, wheat.
-dehydrated veggies or fresh ones (these will be more alive with nutrition) when you find them.
-even though a lot of bars contain ingriedients you need to avoid there are so many different bars and the market changes constantly–so check your options
-bring olive or coconut oil for fat intake
-your challenge may be protein…no beans, nuts, or fish. there's TVP (vegetable protein-soy)and jerkey
-variety in trail food is all about spices so bring along your favorite as it will make seemingly bland food taste like heaven.
-dark chocolate for the fat, taste, and antioxidants
–the main thing here is to not let conventional western food limit your options. this may require more pre-trip cooking and packaging, but I promise you it is completely worht every minute.
your walk will be fueled by you meeting your nutritional needs and that is best done with a variety of unprocessed foods. I wish I had heard this before my hike as I filled my meals with empty "food" like cous cous and pasta and instant rice–all lacking the nutrition native to the grains. And when we scruntinize our gear so much why not our diets, you don't have to eat candy bars and "nutrion bars" dipped in peanut butter to walk all day, everyday.
**Note you want to buy this stuff in bulk at any health food store or through a distributor if none is available. Packaged food is much more expensive.