There is already a good and correct answer from @uhoh, but I thought I’d add another to show off some of my favorite teaching images, and to comment on what we do learn from lunar eclipses.
The reasoning in the question - a round Earth should only cast round shadows - is correct, and in fact has been used since ancient Greek times to argue that the Earth is round. (Again, I’ll emphasize that the pictures shown in the question are not eclipses, but just different views of the day vs. night sides of the Moon, which we call phases.)
In this diagram (from a 1683 geography text by Philipp Cluver, though possibly of earlier origin), the text (roughly translated) says, “This diagram shows that the Earth is round. If the Earth were triangular, its shadow would appear triangular in a lunar eclipse.” And so on for the square and hexagonal (!) Earths. It closes with “nevertheless, it appears round.”

The full shadow of the Earth is much larger than shown in this diagram, and can be recorded with successive images during a lunar eclipse, demonstrating not only that the Earth is round, but that it’s bigger than the Moon:

(Image by Anthony Ayiomamitis, via APOD.)