The Common Chameleon is native to much of the Mediterranean coast. Shakespeare was certainly aware of many Mediterranean locations where Chameleons live naturally. The Comedy of Errors largely centers around two brothers, one from Syracuse in Sicily and one from Ephesus in Anatolia, both regions where Chameleons are found natively. The Winter's Tale takes place largely in Sicily. Antony and Cleopatra takes place in Egypt, another such location, Pericles takes place in Lebanon, Libya, and Anatolia, all areas with Chameleons.
Chameleons also appear in the Bible, without a doubt the most pervasive text at Shakespeare's time. He would have most likely used the Geneva Bible, which had been published in 1560 and was widely available throughout England. Consider Leviticus 11:29-30, part of the portion of the Bible that lays out Kosher Law. "Also these shalbe uncleane to you among the things that creepe and move upon the earth, the weasell, and the mouse, and the frog, after his kinde: 30 Also the rat, and the lizard, and the chameleon, and the stellio (gecko), and the molle."
Shakespeare was fluent in Latin in addition to English, having learned it in grammar school, and thus would have been able to read Latin-language bestiaries. These were medieval picture books depicting hundreds of animals, both real and fictional, written in a somewhat encyclopedic tone. Several of these mentioned chameleons and described their color changing abilities, such as the Bodleian Library Bestiary. This bestiary, while published in Latin, was composed in England. While I do not know if Shakespeare read this specific Bestiary, his descriptions of animals throughout his plays generally match with the traits associated with them by Bestiary authors. This leads me to believe that this is ultimately where Shakespeare would have learned about Chameleons, if not from conversations with others. The bible, after all, does not describe their ability to change color.