The warning against being a generalist has persisted for hundreds of years in dozens of languages. “Equipped with knives all over, yet none is sharp,” warn people in China. In Estonia, it goes, “Nine trades, the tenth one — hunger.”
A polymath is not a jack of all trades or a generalist. A “jack of all trades” learns a little bit about a lot of things. A polymath is proficient in multiple fields.
It is not hard to be proficient in multiple fields, especially if one chooses fields that appeal to you. Learn one new thing every other year and keep pecking at it and 20 years later you’re proficient in 10 fields. The years will pass anyway, why not chase the curiosities that call your name?