I think this is because Wart is a frog (toad to be exact). Frogs are amphibians. Adult amphibians are obligate carnivores (like snakes and weasels, but much stockier).
Wart apparently didn't die in the US version of Super Mario Bros. 2, as he made subsequent appearances in various media, such as his appearance in BS Super Mario USA:
After the events of Super Mario Bros. 2, Mario and friends believe Subcon is all a dream and move on. However, Wart returns and overthrows the King of Subcon in the heroes' absence. Mario and his friends must once again face the forces of Wart, including the Birdo trio, Mouser, Tryclyde, Fryguy and Clawgrip. Both the protagonists and their foes can use the power of the stars (satellites) to their advantage. In addition, Mouser has stolen the gold Mario statues, symbols of peace, and hid them throughout Subcon.
Even in the ending of Super Mario Bros. 2 itself, it doesn't look like he died, as he was still being beaten up by the people of Subcon after his defeat (I imagine a Nintendo game from that era wouldn't show or make implications about people beating on a literal corpse), and is shown laughing at the end of the credits:
As for why he was defeated by eating too many vegetables, as Valorum pointed out in the comments, it is stated in the instruction manual that he hates vegetables:
One evening, Mario had a strange dream. He dreamt of a long, long stairway leading up to a door. As soon as the door opened, he was confronted with a world he had never seen before spreading out as far as his eyes could see. When he strained his ears to listen, he heard a faint voice saying, “Welcome to Subcon, the land of dreams. We have been cursed by Wart and we are completely under his evil spell. We have been awaiting your arrival. Please defeat Wart and return Subcon to its natural state. The curse Wart has put on you in the real world will not have any effect upon you here. Remember, Wart hates vegetables. Please help us!”
At the same time this was heard, a bolt of lightning flashed before Mario’s eyes. Stunned, Mario lost his footing and tumbled upside down. He awoke with a start to find himself sitting up in his bed. To clear his head, Mario talked to Luigi, Toad and Princess Peach about the strange dream he had. They decided to go to a nearby mountain for a picnic.
After arriving at the picnic area and looking at the scenery, they see a small cave nearby. When they enter this cave, to their great surprise, there’s a stairway leading up, up and up. It is exactly like the one Mario saw in his dream. They all walk together up the stairs and at the top, find a door just like the one in Mario’s dream. When Mario and his friends, in fear, open the door, to their surprise, the world that he saw in his dream spreads out before them!....