As one of the most powerful houses of human history, I'm quite surprised at their complete absence in history after the 16-17th century. Are they still alive?
I am an amateur genealogist who just happens to have recently researched the same question.
To answer shortly, there are still many living members of the Medici family today. However, there are no patrilineal (descendants through the male line) of the more famous branches of the family. And lastly, I will point out at the very end why technically Gian Gastone I was not the last Medici ruler.
The last ruling line of the Medici dynasty, that of Cosimo III and later his son Gian Gastone I, didn't produce any other males and thus the Duchy of Tuscany ended up with his second cousin Francis I of the House of Lorraine. Gian Gastone (1671 – 1737) was the last direct legitimate (conceived in marriage) male ruler descendant of Cosimo de' Medici (1389 –1464), who established the Medici as a leading family in Florence. It is possible that the records for a legitimate male in the family was lost, but highly unlikely. Even more unlikely is that someone who married and had children in this branch of the family would not be have any records.
In the matrilineal lines (descendants from a female in the family) there are possibly hundreds of thousands if not more descendants living today.
However, the earliest record mentioning the Medici family dates to 1230. Despite a lack of surviving contemporary documents, genealogical records and oral tradition from the 14th century indicates the family had already been in the Mugello valley (north of Florence) since at least the 11th century with a man known as Medico di Potrone (1046 – 1102) being a possible family patriarch. With that said, there were other recorded branches of the family with achievements of their own, for example:
The Ottajano branch (lastname Medici di Toscana di Ottaiano), decedents of a cousin of Cosimo I, they tried to use this family tie to claim Gian Gastone's titles after he died but didn't succeed. Members of this line are still alive today.
The branch of Grangano, recorded in Naples at the end of the 13th century, managed to gain considerable influence in the region. Controlling multiple churches. It died out in the mid 19th century.
The Medici Tornaquinci family is another surviving branch that can trace their lineage to a 14th century member of the family.
There are others branches and the last name Medici can still be found in Italy, as well as across North and South America. Brazil's former military President Emílio Garrastazu Médici (1905 - 1985) was a descendant from a Medici family that can be traced back to at least 17th century Palermo, perhaps he was the true last patrilineal member of the Medici family with political powers.
SOURCES
Papal Genealogy: The Families And Descendants Of The Popes (McFarland 2009)
The Rise and Fall of the House of Medici (Hibbert 1979)
The Italian Renaissance (Bartlett 2005)
If you are into genealogy check this out: