No—vertebrae evolved before spinal cords, at least in the sense that the bony or cartilaginous vertebral column is a vertebrate invention, while a dorsal hollow nerve cord (the structure from which the spinal cord develops) is a chordate feature that predates vertebrates by a wide margin. The confusion arises because "spinal cord" and "vertebrae" sound like a matched pair, and in living vertebrates they are developmentally and anatomically intertwined. But evolutionary history separates them: the nerve cord is older, the vertebrae are younger, and the "spinal cord" as a named anatomical structure is really the vertebrate portion of an older chordate nerve cord.
What the question is really asking
The phrase "spinal cord" strictly refers to the central nerve cord of vertebrates—the thick dorsal tube enclosed by the vertebral column and continuous with the brain. "Vertebrae" are the segmented skeletal elements (bone or cartilage) that form the vertebral column around that cord. If you take the terms literally, the answer is chronological: chordates with a dorsal hollow nerve cord appear in the fossil record and in phylogeny before animals with vertebrae.
The Cambrian fossil Pikaia gracilens from the Burgess Shale (about 508 million years ago) is widely interpreted as an early chordate with a dorsal nerve cord and no vertebrae. Haikouichthys and Myllokunmingia from the Chengjiang deposits (roughly 520 million years ago) are often described as early vertebrates or vertebrate-grade animals, but their "vertebrae" are disputed and at most rudimentary. The earliest unambiguous vertebral elements—arcualia, the small cartilaginous blocks flanking the nerve cord—are associated with later jawless fishes such as ostracoderms and with the conodont animals, whose chordate affinities were long debated.
So the cleanest formulation is: the dorsal hollow nerve cord is a chordate synapomorphy (shared derived feature); vertebrae are a vertebrate synapomorphy. Since vertebrates are a subgroup of chordates, the nerve cord necessarily predates vertebrae.
The anatomical distinction that trips people up
In a living mammal, the spinal cord runs through the vertebral canal, and the vertebrae protect it. This close packaging encourages the intuition that they evolved together as a unit, like a cable and its conduit. But the nerve cord does not need vertebrae to function: lancelets (amphioxus), which are cephalochordates, have a dorsal hollow nerve cord without any vertebral column. Tunicates have a nerve cord only in the larval stage. In both cases the cord is present without vertebrae.
The word "spinal" itself is a giveaway if you read it etymologically: it refers to the spine, and the spine in common usage means the vertebral column. A "spinal cord" is literally the cord of the spine—the nerve cord that happens to run within the spine in vertebrates. In lancelets, the corresponding structure is usually called the dorsal nerve cord or neural tube, not the spinal cord, precisely because there is no spine. This is a naming convention, not a claim that the lancelet cord is a different organ in kind.
Fossil and phylogenetic evidence
The chordate body plan includes four defining features at some stage of life: a notochord, a dorsal hollow nerve cord, pharyngeal slits, and a post-anal tail. Vertebrates inherit all four and add vertebrae, a cranium, and (in jawed forms) jaws. Because these features are nested—vertebrates inside chordates—the nerve cord must be older.
The fossil record is consistent with this nesting. Cambrian chordates such as Pikaia show a dorsal cord and a notochord-like structure but no vertebral column. The Chengjiang and Burgess Shale faunas preserve soft tissues, which is why the cord is visible at all; in most fossils the nerve cord would decay. Vertebral elements, being mineralized or cartilaginous, are more commonly preserved, which is one reason the vertebrate fossil record is richer in skeletal detail than the chordate record is in neural detail.
There is an important caveat: "vertebrae" in the earliest vertebrates were not the complex, interlocking bones of later fishes and tetrapods. They were small cartilaginous arches (arcualia) associated with the notochord and neural tube. The notochord, not the vertebrae, was the primary axial support in early vertebrates. Vertebrae became the dominant support structure later, and in some lineages (e.g., sturgeons and coelacanths) the notochord persists prominently into adulthood.
Where the boundary gets fuzzy
The line between "chordate" and "vertebrate" is not always sharp in early fossils. Some Cambrian forms are debated: are they vertebrates with rudimentary vertebrae, or chordates without them? Haikouichthys is often called a vertebrate, but its vertebral elements are not universally accepted as such; some researchers interpret its axial structures as cartilage or as notochordal features. This is genuine scientific uncertainty, not a definitional trick. The safe statement is that the dorsal hollow nerve cord is securely older than any accepted vertebral column, while the exact timing of the first rudimentary vertebrae is contested.
A second ambiguity is the word "evolve." If the question means "did the structure we now call the spinal cord exist before vertebrae in the same lineage," the answer depends on whether you count the lancelet nerve cord as a spinal cord. Functionally and developmentally it is the homologous structure; terminologically it is not usually called a spinal cord because there is no spine. Either way, the nerve cord precedes the vertebrae.
Why this matters beyond trivia
The distinction illustrates a general principle in evolutionary biology: structures that are functionally coupled in living organisms need not have evolved together. The vertebrate nervous system and skeleton became integrated over time—the neural tube induces vertebral development, and vertebrae protect the cord—but that integration is a derived condition, not the starting point. Similar cases include the co-option of jaw bones for middle-ear ossicles in mammals, where structures with one ancestral function take on a new role.
For students, the practical takeaway is to distinguish synapomorphies by clade. A dorsal hollow nerve cord diagnoses Chordata; vertebrae diagnose Vertebrata. Because Vertebrata is nested within Chordata, any vertebrate has both, but not every chordate has vertebrae. The lancelet is the standard counterexample: a chordate with a nerve cord and no vertebrae.
Summary
The dorsal hollow nerve cord evolved before vertebrae. Chordates such as lancelets and Cambrian fossils like Pikaia have a nerve cord without a vertebral column, and vertebrates—the clade defined by vertebrae—are a later branch within Chordata. The term "spinal cord" is a vertebrate label for the vertebrate portion of that older chordate nerve cord, which is why the two structures seem inseparable in living animals but are not in evolutionary history. The exact first appearance of rudimentary vertebrae remains debated, but no accepted evidence places vertebrae before the chordate nerve cord.