Bad taste or smell is from something being old and not refrigerated. Rancid is specific to oils or meats, while rotten and spoiled apply to those and also vegetables or pasta etc. These mean bacteria has grown or chemistry has degraded.
Those words don't apply to something being undercooked, which could be fixed with more cooking, while the above words cant be fixed. Besides undercooked, raw can be used here, although usually for meat it now has been generalized, I think due to "raw vegan" fad. "Rare" is used to describe meat that has been cooked but with pink center (which some people prefer) while the opposite is "well done" (very well cooked).