Deficiencies can be caused by parasitic helminths so what you say may be right, but the cause of the deficiencies is not necessarily under eating or a bad diet.
Also the absorption of nutrients can be altered by the state of the small intestine walls so if they are chronically irritated, bleeding, full of mucus (in response to parasitic worms), inflamed, the absorption will not be good enough. Also the parasitic helminths are known to be able to secrete substances to manipulate the immune system cells, so the elimination of harmful substances and harmful organisms will be decreased.