In theory, "malnutrition" means the wrong food and "undernourishment" means too little food. In practice "malnutrition" means the person has so little to eat it is a wonder that they are alive. "undernourishment" is a rare word, and would probably be used in a scientific context: in this case the difference between what the person ate and should eat could be big or small.