My impression of the Spartans has always been something like this: They get a lot of really great press from the Battle of Thermopylae, which is primarily based on a misunderstanding of how that battle actually went down (they were a small contingent of a much larger Greek army that collectively/impressively held off a huge Persian force, and they then stayed behind and got massacred after everybody else wisely got out of dodge). They were really, really severe and eschewed just about any form of decadence or luxury. They trained to fight a bunch and did a lot of calisthenics all the time. They did not, however, actually bother to make a viable state or military system; they focused on self-denial and being tough at the expense of everything else, and thereby set themselves up to be steamrolled by Rome, which was far less severe (and more decadent) but just a much stronger state that fielded a much better army.
In short: The Spartans were kind of a bunch of weirdos that spent a lot of time and effort doing hard-but-ultimately-inconsequential things well while missing the big things that actually make for an effective power. Accurate at all?
Your conclusion is accurate, but for reasons that are more or less the opposite of what you mentioned. Spartans didn't train to fight; they lived a life of relative luxury, and their form of government was widely admired for its stability and longevity. However, their extremely exclusivist social hierarchy involved an ever-shrinking citizen body propped up by a repressed underclass of state serfs, and their foreign policy amounted to the constant exploitation of subject "allies" to pursue the interests of Sparta. Eventually, the combined force of their disgruntled foreign subjects and the people they had oppressed for centuries led to the rapid demolition of their hegemony. They were reduced to the status of a second-rate local power by the 360s BC.
Were they really that great as warriors? Probably not. As you say, they got most of their military reputation thanks to what happened at Thermopylai. Before the Persian invasion, they were already the leading power of mainland Greece, but they don't seem to have had a particular name for their fighting ability. They simply had a large land area and a large number of citizens, which allowed them to dominate the entire Peloponnese and live as a ruling leisure class. No one expected the Spartans to fight better than anyone else, and at Thermopylai the Greek contingents took turns defending the pass. However, it was the Spartans (along with some others) who fought to the death, and this established their supposed die-hard attitude of never retreating and dying at the command of their laws. Our main surviving account of the battle, by Herodotos, was written some 40-50 years after Thermopylai, and was clearly already heavily coloured by the Spartan reputation that had developed since then.
It is probably true that the Spartans to some extent began to live their reputation, to make it real. While we have no evidence that they trained to be better fighters, we know that they constantly extended their strict laws about how citizens were supposed to live their lives. Around the time of the Persian Wars they were only different in degree from other Greek city-states, but from that time onwards their customs became more and more distinct. During the Classical period they perfected their famous upbringing for boys (later called the agoge) and required all adult male citizens to take part in daily athletic exercises and to live together with their messmates at all times. Probably around 400 BC, they created a tradition that they had always eschewed luxury, and banned the private ownership of money, to prevent Spartans focusing more on accumulating wealth than on being good citizens. They seem to have adopted uniform battle gear at some point in the late 5th century BC, and they started to practice basic formation drill, which set them apart from all other Greeks and gave them an edge in battle.
The result of all this was that Sparta began to look increasingly quaint, and other Greeks liked to draw a contrast between themselves and the Spartans. Some admired their upbringing, while others abhorred it; some praised their constitution while others saw flaws in it. Spartans weren't allowed to do any work, and lived as a leisure class, which was an ideal of Greeks everywhere; many envied the Spartans for having made it a reality. However, few desired to do as the Spartans did and fill the resulting leisure time with hard exercise and enforced moderation. The old, pre-Classical institutions of Spartan society were designed to prevent envy and factional strife within the leisured elite. As such they were very successful, but few others wished to make the sacrifices necessary to make it work.
Even so, we shouldn't overstate how much the Spartans focused on being an effective militia. Modern scholars have noted that the Spartan upbringing wasn't intended to create good warriors - it involved no military training whatsoever - but good citizens, who were respectful and obedient and not ruled by excess. As I've said, Spartan citizens were a leisure class, and they liked to do leisure-class things, like raising horses and hunting hares and drinking with other rich men. Their life was not a militarist hell, but a fairly rigorously controlled state of apparent equality and good citizenship, which led to two things the Greeks prized most in a state - political stability and an effective militia.
Throughout the Classical period, we see other Greeks being afraid to fight Spartans. They were considered braver and stronger, and the idea that they would never retreat or surrender made them a terrifying opponent. However, when they actually fought, they rarely turned out to do much better than other Greeks, and there are several cases of them retreating or surrendering. Their track record in pitched battle is pretty good, with an unbroken winning streak running from about 550 BC down to 371 BC, but they were beaten many times in smaller battles, skirmishes, ambushes, naval battles, siege engagements and the like. Overall, they don't seem to have done much better in war than any other Greek state, and they always struggled to hold on to their position of hegemony. In 371 BC, the Thebans finally inflicted a heavy defeat on them in pitched battle at Leuktra, and they proceeded to dismantle the Spartan power base in the Peloponnese, liberating lands formerly conquered by Sparta and giving their former subjects the means to keep Sparta down. The Spartan reputation lingered for a while, but Sparta never really regained its power.
The ancient city state of Sparta, its government, military prowess, and position of power relative to its peers varied wildly through antiquity. I'm going to assume you are asking about Sparta from the beginning of the Classical Period thru the end of the Hellenistic period, since you reference the Persian Wars and the Roman conquest. This is still a huge time period where Sparta changed a lot, but i'll do my best to address your main question.
Let's start off by seeing what Herodotus has to say about the battle of Thermopylae. Herodotus of Halicarnassus was a 5th century BCE Greek ethnographer form Asia Minor who wrote the Histories, an inquiry into the causes and course of the Persian war. Despite being heavily embellished by myth and legend, the Histories is widely regarded as the first true of work of its eponymous discipline and is the main reason why Herodotus i often regarded as the "father of history". It is also our main primary source for the Persian Wars. Towards the end of Book VII, he writes:
When they had come to the Isthmus [of Corinth], the Greeks, taking into account what was said by [king] Alexander [of Macedon], deliberated as a body how and where they should stand to fight. It was decided that they should guard the pass of Thermopylae, for they saw that it was narrower than the pass into Thessaly and nearer home. The pass, then, which brought about the fall of those Greeks who fell at Thermopylae, was unknown to them until they came to Thermopylae and learned of it from the men of Trachis. This pass they were resolved to guard and so stay the barbarian's [ie. the Persians'] passage into Hellas [ie. Greece]... The number, then, of those whom Xerxes son of Darius [the Persian Emperor] led as far as the Sepiad headland and Thermopylae was five million, two hundred and eighty-three thousand, two hundred and twenty... The Hellenes who awaited the Persians in that place were these: three hundred Spartan armed men; one thousand from Tegea and Mantinea, half from each place; one hundred and twenty from Orchomenus in Arcadia and one thousand from the rest of Arcadia; that many Arcadians, four hundred from Corinth, two hundred from Phlius, and eighty Mycenaeans. These were the Peloponnesians present; from Boeotia there were seven hundred Thespians and four hundred Thebans. In addition, the Opuntian Locrians in full force and one thousand Phocians came at the summons. ... the rest of the allies were expected any day now... There was nothing for them to be afraid of. The invader of Hellas was not a god but a human being... When they heard this, the Locrians and Phocians marched to Trachis to help. Each city had its own general, but the one most admired and the leader of the whole army was a Lacedaemonian [ie. a Spartan], Leonidas... He now came to Thermopylae with the appointed three hundred he had selected... The Spartans sent the men with Leonidas on ahead so that the rest of the allies would see them and march, instead of medizing [ie. sympathyzing with the Persians, also known as the Medes] like the others if they learned that the Spartans were delaying.... but the Hellenes at Thermopylae, when the Persians drew near the pass, fearfully took counsel whether to depart. The rest of the Peloponnesians were for returning to the Peloponnese and guarding the isthmus, but the Phocians and Locrians were greatly angered by this counsel. Leonidas voted to remain where they were and send messengers to the cities bidding them to send help, since they were too few to ward off the army of the Medes. While they debated in this way, Xerxes sent a mounted scout to see how many there were and what they were doing... he returned and told Xerxes all that he had seen. When Xerxes heard that, he could not comprehend the fact that the Lacedaemonians were actually... preparing to kill or be killed. What they did appeared laughable to him, so he sent for Demaratus... who was in his camp. When this man arrived, he asked him about each of these matters,wanting to understand what it was that the Lacedaemonians were doing. Demaratus said, “You have already heard about these men from me, when we were setting out for Hellas... These men have come to fight us for the pass, and it for this that they are preparing. This is their custom: when they are about to risk their lives, they arrange their hair.... [Xerxes] let four days go by, expecting them to run away at any minute. They did not leave, and it seemed to him that they stayed out of folly and lack of due respect.
So, a few things so far. First, just to get this out of the way, Herodotus' claim that the Persian army was over 5 million strong is, without a shadow of a doubt, a gross exaggeration. Modern historians estimate that ancient logistics would have allowed for armies as big as 50,000 at the largest. The point to take away from this is that the Greeks were heavily outnumbered, even before most of the allies left. Second, you are completely right in stating that the original Greek contingent was a few thousand-strong coalition of various city states, not just the famous 300 Spartans. However I would argue that the "press" has an almost ridiculous historical precedent. The idea of Spartans as "great warriors" predates even the very battle that is largely responsible for immortalizing their legacy through the modern era! Note how Demaratus, one of Xerxes' retainers, advises him that it is customary for the Spartans to be dead serious about trying to hold the pass against insurmountable odds. Furthermore, note Xerxes' incredulity! He literally cannot process the fact that any army that small would have such determination, so in his mind they MUST either be stupid or trying to mock him. Finally, Leonidas' position as the paramount general of the coalition speaks highly about the contemporary perceptions of the Spartan military as an elite force, especially when there were fielding a smaller force than other city-states. Moving on to what Herodotus say about the battle itself:
On the fifth day he became angry and sent the Medes and Cissians against them, bidding them take them prisoner and bring them into his presence. The Medes bore down upon the Hellenes and attacked. Many fell, but others attacked in turn, and they made it clear to everyone, especially to the king himself, that among so many people there were few real men. The battle lasted all day. When the Medes had been roughly handled, they retired, and the Persians whom the king called Immortals, led by Hydarnes, attacked in turn. It was thought that they would easily accomplish the task. When they joined battle with the Hellenes, they fared neither better nor worse than the Median army, since they used shorter spears than the Hellenes and could not use their numbers fighting in a narrow space. The Lacedaemonians fought memorably, showing themselves skilled fighters amidst unskilled on many occasions, as when they would turn their backs and feign flight. The barbarians would see them fleeing and give chase with shouting and noise, but when the Lacedaemonians were overtaken, they would turn to face the barbarians and overthrow innumerable Persians. A few of the Spartans themselves were also slain. When the Persians could gain no inch of the pass, attacking by companies and in every other fashion, they withdrew. It is said that during these assaults in the battle the king, as he watched, jumped up three times from the throne in fear for his army. This, then, is how the fighting progressed, and on the next day the barbarians fought no better. They joined battle supposing that their enemies, being so few, were now disabled by wounds and could no longer resist. The Hellenes, however, stood ordered in ranks by nation, and each of them fought in turn, except the Phocians, who were posted on the mountain to guard the path.109 When the Persians found nothing different from what they saw the day before, they withdrew. The king was at a loss as to how to deal with the present difficulty.
Once again, Herodotus indirectly praises the Spartans' military skills through Xerxes reaction to their resistance. He is so completely take aback by their martial prowess that he physically reacts to his army being slaughtered! By the way, the Persian "immortals" got their name from their seemingly inexhaustible numbers (Xerxes always had more to replace those that died) rather than their skill. More importantly though, Herodotus directly references the Spartans' superior combat ability. Part of this is their equipment, which is something that is common to all Greek hoplite formations. Herodotus himself comments on the superiority of Greek equipment to that of the Persians' in his account of the battle of Marathon, where Athenian hoplites (with the aid of a small Platinean contingent) repulsed the first Persian invasion of Greece ten years earlier. But Herodotus' specifically references the Spartans' skills, which, together with their bravery made them uniquely formidable opponents at Thermopylae. Speaking of hoplites, you seem to be under the impression that Spartan warriors were extraordinarily individualistic, but you should know that any hoplite formation that hopes to be remotely effective in battle is a highly dependent on teamwork. The way they would overlap their shields meant that you protected the right half of your neighbor's body with your hoplon (the distinctive round shield that gave hoplites their name), while the right half of your own body was being protected by your neighbors hoplon. Hoplite-on-hoplite battles were actually fairly low-casualty encounters where the first formation to break ranks lost. Later in the Histories, Herodotus includes an account of the battle of Plataea, where the Athenians and Spartans argue over who will take over the right flank, which would be a position of leadership and honor considering the rightmost hoplite had half of his body exposed.
(continued in reply)