How does one specialize in a certain sub-field of aerospace engineering?
I'm going to speak for a North American post-secondary experience. The simple answer is, you don't get to specialize in any particular domain within aerospace engineering as an undergraduate, even if your major is aerospace engineering. Why? Because you don't know anything yet for you to specialize. How can you know what you like, if you don't know anything yet?
The first two years of college are foundational studies, during which the courses and materials are more or less the same across any engineering field. You mentioned aerodynamics. Well, you can't do aerodynamics if you don't know linear algebra, vector calculus or basic fluid dynamics. The last two years would be more tailored to your major, but these will only give you a general gist of all the major domains that aerospace touches.
You get to specialize once you enter industry, or if you choose to pursue even higher educations (Master's, PhD, professorship). Whatever it is, what you ended up specializing will probably be very different than what you thought you'd be doing at the start of college, either because of change of interest (now that you know what the fields actually are), or monetary reasons (field A is more lucrative than field B), or pragmatic reasons (because field A has N openings and field B has zero).