#No the Couatl cannot gain Spellcasting using Change Shape
No the Couatl cannot gain Spellcasting using Change Shape
[The Couatl] gains any Statistics and capabilities (except Class Features, legendary actions, and lair actions) that the new form has but that it lacks.
###Spellcasting is a class feature, even for monsters
Spellcasting is a class feature, even for monsters
According to the introduction to the Monster Manual:
A monster with the Spellcasting class feature has a spellcaster level and spell slots, which it uses to cast its spells of 1st level and higher...
The monster has a list of spells known or prepared from a particular class. [...] The monster is considered a member of that class when attuning to or using a magic item that requires membership in the class or access to its spell list.
So the rules say that Spellcasting is a class feature even with monsters. In fact, the association with a class seems to be the distinguishing difference between Spellcasting and Innate Spellcasting (and there is indeed a difference). In this case, the Hobgoblin Devastator is considered to be a member of the Wizard class even though it doesn't say Wizard anywhere on it stat block.
This has been clarified and confirmed by Jeremy Crawford:
The Spellcasting trait in monsters is associated with a class, as explained in the introduction to the Monster Manual. That's a class feature.
Because Spellcasting is a class feature, the Couatl will not get this ability when it uses Change Shape to turn into a Hobgoblin Devestator.