Marginalia is general term for whatever was drawn in the margins, I think a more precise term is drollery, from French drôle which means funny. https://en.m.wikipedia.org/wiki/Drollery
I watch a lot of history documentaries and one of the channels is ‘chronicle - medieval history documentaries’ channel on YouTube. I just discovered they used to have someone post memes and have recently restarted that (in the community section)