Is puking blood when punched in the gut a common trope in anime?
Yes, this is a trope known as blood from the mouth and sometimes also crosses over with the waterfall puke where a stream of blood will follow.

This trope is used to indicate significant physical damage to a character, through a force that would be at least significant to getting hit by a car.

Disclaimer, I am not a medical professional. The following based on prior received medical treatments and their explanations, and online articles.

In real life this can also occur, it is one of the symptom of severe hemorrhaging, which in it self is internal bleeding due to damaged blood vessel's.

Vomiting blood is considered a dangerous symptom which would require immediate medical attention.

A pretty good explanation on what Hemorrhaging is in near layman terms can be found on: medical news today