Esta comida huele a podrido.

English Translation

This food smells rotten.

Why wouldn’t podrido be feminine to agree with comida?

My take on this is that huele a podrido is conceptually “huele a [algo [que está]] podrido”; it smells [of something [that is]] rotten.