They didn't ask people for their evaluations before the test; they asked after the test, and after it had been scored, to see where people thought their score ranked relative to the rest of the people who had taken the test.
So, people already knew how many things they had gotten right and wrong when making their judgement. They just judged that most other people had also gotten a similar number wrong.
Congrats you've discovered the other half of the Dunning Krueger effect. The smartest people in the test will assume others might know more than them, because they know enough to know they aren't experts.
So, people already knew how many things they had gotten right and wrong when making their judgement. They just judged that most other people had also gotten a similar number wrong.