Here's the image, mirrored to Imgur and here's the original Instagram post.
It appears to be from Boccaccio's Des cleres et nobles femmes.
My impression was that in the Middle Ages, this would have been far outside the role of women. Am I wrong about this? Would some women have been recipients of instruction in things like astronomy, and would some have even taught?
Was Boccaccio working to change this by publishing his book?
First: the tl/dr: This is not a woman teaching an astronomy course (as the Instragram post asserts). It is a somewhat allegorical depiction of a late Roman female poet teaching about creation through her poem.
To understand this illumination, it is necessary to understand the work it accompanied. Written in 1361-2, Boccaccio's De Mulieribus Claris was a set of over 100 biographies of famous women; he also wrote a similar work about famous men. This particular genre usually included examples of both the infamous and virtuous as a way encouraging the latter, and Boccaccio was the first to write one about women. It was dedicated to Andrea Acciaioli, the Countess of Altavilla, a member of the court of Joanna, the Queen of Naples. The Countess was a well-educated woman and part of an influential banking family.
The work was translated into French as Des cleres et nobles femmes, and the illumination in question was one of many that accompanied a particular manuscript featuring this translation. The women in the work were a mix of the mythological, the legendary, and the historical. This illumination in question accompanies Number 97 in this series, and depicts Proba (Faltonia Betitia Proba), a 4th century Latin poet from a wealthy, important family, known for recombining verses from Vergil (from several of his works) into a poem about the history of the world, culminating in the life of Christ.
So, the illumination is not "an astronomy class" (as suggested in the Instagram post) at all, but an allegorical depiction of the poet Proba teaching about the history of the world through her poem. She is not dressed in academic clothing, but instead in fashionable clothing contemporary to the date of the manuscript that would mark her as wealthy and important. Dressing historical or legendary figures in contemporary clothing was often done in manuscripts of this type; thus, Proba is clothed not like a wealthy late Roman lady, but as a wealthy early 15th century one (with perhaps some fanciful elements added to her garb); she wears a richly-coloured dress along with the veil that marks her as a married and pious woman. Only her pointer indicates her role as a teacher.
It should be mentioned that Boccaccio almost certainly never saw these illuminations (which accompanied a translation into French in the early 15th century, at least 40 years after its composition); typically, the authors of works such as this one that were illuminated had no say/control as to the illustrations that accompanied them.
So, putting aside the illumination, what can be said about Boccaccio's intent? In writing his work, which included depictions of educated women as virtuous, he likely have had his friend and patroness--and the court she was part of-- in mind. Proba herself would have been a perfect example of such a woman, an educated woman well-versed in the classics but at the same time of high moral character and Christian faith. It is certainly true that in Boccacio's world of Italy in the late 14th century, women were more and more becoming significant patronesses of the arts, and so the timing of the composition of this particular work makes a great deal of sense. Boccaccio was certainly not advocating that women could or should become "professors" of some sort, but that being learned could support a noblewoman's high moral character; such women should be praised, encouraged, and emulated. Implicit in this is the idea that education for women--especially pious, wealthy women--would contribute to, not detract from, their virtue.