You don’t get aspergillosis (an infection) from eating foods contaminated with Aspergillus, but you could get aflatoxicosis (poisoning) instead. Aspergillus is an opportunistic pathogen, which means that it did not evolve to live in humans or cause disease – the spores are inhaled incidentally by humans all the time, and they only cause disease in people whose immune system is weakened in some way. Aspergillus fungus normally grows on damp plant matter including crops such as peanuts, soybeans, rice and maize.
Aspergillus flavus and Aspergillus parasiticus produce chemicals known as aflatoxins. At low levels the liver can detoxify them – acceptable levels are set by agencies such as the FSA (UK) or the FDA (USA). Acute aflatoxin poisoning causes severe liver damage and sometimes death (particularly in children and people with hepatitis B), while chronic lower-level poisoning can damage the immune system and cause liver cancer. In this picture (copyright Gary Munkvold), a Kenyan man has a massively swollen liver caused by aflatoxicosis.
Outbreaks are often due to inadequate methods for drying and storing maize, for example in the developing world where storage infrastructure is lacking. Where testing facilities (or the money to pay for them) are not available, the World Health Organization (WHO) recommends some low-tech strategies: remove any mouldy kernels/nuts, dry thoroughly and store elevated above the ground, clear away mouldy debris from previous harvests.
Read about an aflatoxicosis outbreak in Kenya (2004) that killed 125 people, which was caused by eating maize contaminated with aflatoxin at 220 times the recommended limit.