Seemed to me the Federation was supposed to be the UN, not the USA.
TOS never really defined what the Federation was. Later movies and series did treat it as something closer to the US than the UN, since it had a president and such.
The references to "Earth Starfleet" and whatnot make sense if you assume each planet is still more or less maintaining their own fleet.
There has never been an onscreen use of the phrase "Earth Starfleet." (
The only two times those words appear consecutively are with a comma between them.) The term "United Earth Starfleet" is used on Memory Alpha to refer to the Starfleet depicted in
Enterprise, which predates the founding of the Federation. Presumably Earth Starfleet and the other founder worlds' space services were folded into the Federation Starfleet after 2161 (and I've explored the early stages of that integration in my
Rise of the Federation novels).
Before TMP it was common to accept the dating referenced in "Space Seed" that TOS' 5-year mission happened some 200 years afrer the 1990s or so. TMP threw a wrench into that by referencing the launch of the Voyager probes being 300 years past. And thats what we've basically gone with since.
There was also "Metamorphosis," which established that Cochrane had vanished 150 years before at age 85. Since most scientists and inventors make their greatest achievements at a relatively early age, it follows that warp drive was probably invented close to 200 years before TOS, which makes the date references in "Space Seed" and "Tomorrow is Yesterday" a bit iffy. The production staff seemed to have settled on the 23rd century as the time frame by season 2, because that century was specified in
The Making of Star Trek. Note, by the way, that the first work that mentioned a 23rd-century time frame for the series was James Blish's adaptation of "Space Seed," which predated TMoST's release by several months. That's despite the adaptation using the "200 years" dialogue from the episode.
And you're oversimplifying a bit. For decades, there were two conflicting schools of thought on when TOS took place. There was the
Spaceflight Chronology model where TOS took place in the first decade of the 23rd century, which was an attempt to reconcile the 23rd-century references in the movies with the 200-years references in season 1. And there was an alternative model that put TOS exactly 300 years after its airdate, in the 2260s. There were fans and authors who favored both models, and it wasn't until TNG's "The Neutral Zone" explicitly pegged the calendar date as 2364 that the question was resolved (because we knew TNG was about a century after TOS, and that McCoy was only 137 as of TNG). I was actually a proponent of the earlier timeframe myself at the time, and I had to rework my entire chronology once "The Neutral Zone" aired.
A lot of this future history was easier to accept back in the 1960s/'70s when the 21st century was still decades in the future. Now into our second decade into the 21st century the idea of humanity even getting out of the solar system in the foreseeable future seems remote.
Well, according to "Space Seed," we're going to stop using interplanetary sleeper ships two years from now, when faster means of interplanetary travel are developed...
The idea of Vulcan, Andor and Teller beings founding members of the Federation alongside Earth is not established in TOS, but an idea born from fandom. I don't know if that was clarified in any of the later series or we are all still assuming this after fifty years.
Temporal Agent Daniels confirmed in
Enterprise: "Zero Hour" that the signers of the Federation Charter in 2161 would include humans, Vulcans, Andorians, and Tellarites. So it is canonical now.
To be specific, Franz Joseph's
Star Fleet Technical Manual established the founding members of the Federation as governments based at Earth, Alpha Centauri, 40 Eridani, Epsilon Indi, and 61 Cygni. But they were all treated therein as implicitly human civilizations (judging from their flags and symbols) with the exception of 40 Eri, which James Blish had identified as Vulcan's home star years earlier in his "Tomorrow is Yesterday" adaptation. Later, the
Star Fleet Medical Reference Manual by Geoffrey Mandel, Doug Drexler, Anthony Fredericksen, et al. identified the Andorians as being from Epsilon Indi and the Tellarites from 61 Cygni, which as far as I know was the source of the idea that they were founding members. It was unofficial fan lore until ENT canonized it.
I think the UESPA references can be made to fit if you accept at this point the that Enterprise was still an Earth ship, albeit one given Federation missions from Starfleet as well as Earth missions from UESPA. The former eventually eclipsed the latter, and Starfleet became the de facto coordinating body for all member planets' scientific and military fleets. This probably occurs during TOS actually.
There's
a logo in ENT: "Demons" that identifies the pre-Federation Starfleet Command as an aspect of UESPA (or vice versa). The interpretation I've gone with in my novels is that the UFP Starfleet is a union of UESPA, the Andorian Guard, and the other founders' space agencies, similarly to how the European Space Agency is an alliance of the EU member nations' respective space agencies, with some taking a more direct role in spaceflight and others just providing funding or research assistance or the like. In my books, UESPA mainly handles exploration, the Andorian Guard focuses on defense, the Vulcan Space Service is research-focused, the Tellarite space agency is basically the merchant marine, etc. I figure that over time, the distinct space agencies become absorbed into a more unified Starfleet, but that they remain as administrative divisions rather than distinct national entities -- so the
Enterprise is under UESPA because it's mainly an explorer, say. But these subdivisions were phased out by the time TMP came along.