I think it would be a good idea to see if the rescue would let you have her medical records to see what the vets think about her care and treatment and possible outcome
Food can definitely be a problem--sometimes you can find which foods cause the problem by trial and error, and my vet recently told me it can take 6 weeks to see if changing the food helps. (My foster dog has had ear issues.) One possibility is to put the dog on an expensive, hypoallergenic prescription diet.
Environment can also be a problem--from grass or weeds in the yard to laundry products or cleaning products, or pet grooming products.
Adopting a rescue dog is wonderful, in theory, but you need to be sure for your own good, as well as the dog's, that you can deal with the issues for as long as it may take to get past them!