Illiteracy is the inability of individuals to read or write, the condition of being unable to read and write. Now a person can have comprehension problems and still be literate. We do not all comprehend the same when reading the same thing. Comprehension problems are not unusual, in fact quite common. Total illiteracy is rare today but it is still there in our society.
Ignorance really has nothing to do with the ability to read and/or write. A literate person can be as ignorant as an illiterate person, it all depends on the subject. I know almost nothing about geology, and a host of other subjects. I am ignorant of them, I have read an article here and there on the subject but remain ignorant on the matter. That is not unusual either, it is also very common. We are all ignorant of a lot of things. It is impossible to know something about everything, We are not Professor Irwin Cory who used to claim to be able to talk intelligently on any given subject for about 5 minutes. I saw him at a nightclub in Denver in the mid 60's. He was funny and sounded good to me.... Proving a point no less.
Stupidity is knowing a bit on a given subject and insist on being an expert or using the minute (adjective instead of a noun) amount of knowledge or information gleaned to draw complete erroneous conclusions. And if a person persists in this they expose their stupidity to a broader audience. This is not unusual either and we all need to keep this in mind. It reminds me of the old saying that it is better to have people think we are idiots than to open our mouths and prove it beyond all doubt.