This is an illustration from the 1865 children’s story Max und Moritz of a grain mill with an output chute featuring a grotesque decoration–which looks a lot like the character Shrek:
Was the cartoonist William Steig (who created the book Shrek! on which the first Shrek movie was based) influenced by Max und Moritz? Or was this some traditional type of monster/ogre that has historically been shown as looking like this, with a bald head, large mouth, and horizontally elongated ears?
Aside from the ears (and being “a face”), it’s even less like the original Shrek from the books which has a much cruder face, a round bulbous nose, a pointy head and hair. That said, I guess it’s possible that Steig saw the comic/film and either consciously or subconscious included the ears as being pretty nifty. The book is from 1990 so plenty of time for the author/artist to have come across either.
To me, what’s definitive about Shrek’s appearance, as distinct from any other depiction of an ogre, is that his ears are conical. All of those other depictions, from both of the Max und Moritz sources and from the Shrek book, appear to have normal ears (or at least, as close to normal as the art style permits) on the ends of stalks (which is, admittedly, a deviation from the ogre norm, and potentially interesting). The other ears don’t look like the sort of thing one might extract a taper candle of earwax from.