For the younger crowd here, I wish I would have started a 529 plan for my unborn children from my unknown wife at the time.
Lets just say you are 23, maxing out your Roth IRA and have some extra cash (but are planning on meeting someone and having kids some day).
Throw $1k or $3k into the Vanguard plan (you can start a 529 in your name and transfer it penalty free). 20/25 years of tax free growth could be really nice. I like the Vanguard plan more because of its ease of use rather than picking a state plan (even though you are probably losing a tax deduction) because you have no idea where your future kids will want to go to school or even what state/country you will be living in.
I exactly meet your hypothetical situation - I am maxing my Roth, and have extra cash left over that I put into taxable investments. And I do hope to meet someone and have kids one day.
But I don't think your plan would be wise. The obvious is if I don't meet somebody, or I do meet somebody and change my mind about having kids. Now the money is stuck in a 529, and I have to pay a 10% penalty on the gains to pull the money out.
Also, at least until I actually have a child, I would do better by just using taxable investing. A taxable investment from Vanguard can be used for any purpose whatsoever. Also, their expense ratios are lower than those found in even the best 529s (although marginally so if we're looking at the best 529s). Still, the lower expense ratio is guaranteed. Using 529 money for education of a hypothetical child is not.
And, if an investor can use tax gain harvesting because he or she is in a low tax bracket, using taxable investments can be incredibly efficient because he or she can raise the basis of their investments for free (at least on a federal level. Depends on which state for those taxes).
Finally, in that situation you'd probably end up naming yourself as the beneficiary of the 529. When you change the beneficiary of a 529 across
generous(EDIT: brain fart, meant generations), it is subject to gift taxes (for which up to $14k per donor donee pair is excluded from tax each year). Disadvantageous for large balances of 529s (which probably wouldn't happen in your scenario of just putting a couple thousand in). Fortunately, it could be mitigated by rolling over some of the balance into a new 529. Then, change the beneficiary of the old 529 in the current year and the beneficiary of the new 529 in a future year.
Hindsight is 20/20.