Jesus mentions cumin in Matthew 23:23 in reference to the Pharisees' tithing practices, rather than a health-related issue. Cumin is mentioned along with mint and anise to highlight the exaggerated oral law that the Pharisees established.
While the Pentateuch never stipulated that such herbs and spices be tithed, the Talmud and Mishnah defined "everything eatable, everything that was stored up or that grew out of the Earth" as subject to tithes.
Therefore, the Pharisees, who made a point to highlight their obedience to every aspect of the oral law, made an effort to even tithe small seeds such as anise and cumin. Jesus compared this attention paid to relatively unimportant parts of the Law to their ignorance of the principles behind Moses' laws.