It's well known that the time period for monsters in Monsters Inc is set in the future and they have mastered time travel.

With that it can be easily believed that they traveled back to our dimension during the black death. All that it would have taken was one flea carrying the disease to wreak havoc on the Monster's universe.

This also explains why the monsters are shaved after being "contaminated".