...Also this makes me think; what happened to the various royal families by the time of Trek? Earth is a united planet, so there can't be kingdoms for them to rule anymore... Are they all deposed?
That's assuming any of them survived WW3 and the Post-Atomic Horror, that is.
Well, take a look at the world's most famous royal family. They're not actual government rulers, just honorary figures. Emperor Kahless is a contemporary (24th century) example. It's conceivable that such people might still exist on certain Federation worlds. Including, possibly, ones colonized by humans.
If you are writing about the British royal family, the head of it, the monarch, has an role in government. The monarch more or less makes every decision of the parliament, the cabinet, and the prime minister happen by giving their assent. Of course it has been a century or two since the monarch has not given their assent to the will of the government.
I note that most countries in the world have a separate head of government, like a prime minister, who runs the government and rules the country, and head of state, such as a president or a monarch, who is the living symbol of the country. Countries where the head of government and head of state are the same person, like the president of the USA, or the King of Saudi Arabia, are a minority. Which doesn't mean that the many heads of state who are not heads of government have no governmental functions at all.
...We don't know what 'united' truly means, in this context, I think. If it's a kind of E.U. structure, it just might be possible -- we still have various monarchies here in the E.U. where they're mostly only figureheads.
I doubt those royal families would survive into the 24th century anyway, but not necessarily on those grounds.
...I agree that we don't exactly know what "united" means in canon, but to me it means that Earth is now one "nation" with the countries and nations of the past existing as "regions" within that "Worlwide Nation". And Jean-Luc saying he's French just means he originates from the French "region" just like a modern Italian person can say they are "Venetian" despite Venice not existing as an independent nation/republic for well over 200 years now.
But I am fully aware that it is just my interpretation.
I guess in that case the British royal family would be kind of like the former rulers of Hanover now, who's former kingdom doesn't exist as a independent country anymore either.
You seem to accept the popular idea that a kingdom must be a soverign and independent country.
In 19th century Europe newly independent coutnries usually became kingdoms, thus creating an idea that kingdoms were independent countries.
But even in Europe, Bohemia was a kingdom for over 700 years, but was never an indpendent country in all that time.
Similaly, the Kingdom of Slavonia was part of the Kingdom of Croatia until 1868, the Kingdom of Croatia was part of the Kingdom of Hungary until 1868, and the Kingdom of Hungary was part of the Empire of Austria from 1804 to 1868. Because the same person occupied all four thrones, that is little noticed.
Germany was united by the formation of the German Empire in 1871. But that didn't mean that the Kings of Prussia, Saxony, Bavaria, and Wurttemburg lost their crowns, or the grand dukes, dukes, and princes who were sovereigns of other states in the new German Empire.
And medieval Ireland has many exmples of non independent kingdoms and kings.
At the present time there are 44 sovereign states which are monarchies - but Barbados is planning to become a republic before the end of 2021.
https://en.wikipedia.org/wiki/List_of_current_monarchies
That is much smaller than the number in Wikipedia's list of current constituant monarchs.
This is a
list of currently reigning constituent monarchs, including
traditional rulers and governing constitutional monarchs. Each monarch listed below reigns over a legally recognised dominion, but in most cases possess
little or no sovereign governing power. Their
titles, however, are recognised by the state. Entries are listed beside their respective dominions, and are grouped by country.
https://en.wikipedia.org/wiki/List_of_current_constituent_monarchs
Many of those rulers have titles which may be more like noble titles than royal titles. I am certainly not familiar enough with those rulers to know which titles are more like noble titles and which are more like royal titles.
But I think that the number of kingdoms which are constituant parts of larger monarchies or republics is much greater than the number of kingdoms which are independent countries.
I point out that in the
Lensman series of space operas a state which humbly calls itself "Civilization" rules most of the Miliky Way Galaxy, with some kind of a federal system of millions or billions of planetary governments under the central goverments. There are several mentions of planetary presidents within "Civilization". In one scene, an enemy terrorist uses mind control on the prime minister of a member planet within "Civilization", to make him murder the other ministers and his monarch in a cabinet meeting.
You should also read my answer to:
https://worldbuilding.stackexchange.com/questions/110223/imperial-kingdoms