I'm a senior at a large, racially and economically diverse public school in the suburbs of Chicago, like many of the surrounding schools. Here's my two cents. Can I preface by saying that, for the sake of convenience, "upper-middle class" will be included with "upper-class" in this.
Why XC/Distance attracts (white) upper-class: There are a few main reasons. For one, most people on my team and other teams are tall and lean/lanky. These qualities are undeniably more common in white people than in other large minority groups in the area. We're not all horribly unathletic/uncoordinated/"no-hands", but most of our childhoods were spent doing swimming, soccer, or even basketball for some, but at the park district rec-leauge level one doesn't need a lot of pure athleticism to have fun. Corny, I know. Either way, we grew up doing more cardio or fitness-based activities, if any at all. By the time middle school sports come, people like us stay away from hard contact sports like football and basketball, or are weeded out after a few years. The people that excel at them, usually minorities, have been playing for much longer with their friends without helicopter-parents everywhere so they're already stronger and arguably tougher. They also leaned toward sprinting in track because pure speed is essential for their other sports. Coincidence or not, a lot these kids were also on the free lunch plan and came from poorer backgrounds, so the food they ate gave them bigger bodies, unlike our parents who have been pushing fruits n veggies since before we could remember. Not a stereotype, this is a real statistic. The physical differences could also be attributed to genetics. Upper-class white kids whose parents have had them swimming/similar sports will generally excel at cross country almost immediately because of their own backgrounds and support from their parents who can afford to leave work early to watch their kid race or get them into a USATF-type running club in the area with more experienced coaches. As middle school sports are underway, kids will go towards the sports where they see people like them doing well. This is where the bigger divide comes, as most varsity football positions (exceptions: QB and linemen) are black, so it's more attractive for other black and minority kids to join instead of the cross country team that is almost all-white, who are also wearing much more exposing clothes by this time. I think the short-shorts/running tights dilemma is another socioeconomic problem in itself. It discourages a lot of people, usually minorities, who live in rougher neighborhoods and will catch a lot more crap for jogging down the street in booty shorts than a white kid in a rich neighborhood would while wearing the same thing. Wealthier communities also have better infrastructure for running: well-maintained trails, riverwalks, clubs, and running community in general.
Once everyone is in high school or even after a year or 2, the racial and class divide in sports becomes self-fulfilling without needing any "real" reason to explain it.
One more thought: lower or middle class people are more likely work physically demanding jobs, have more kids that they need to provide for and dedicate more time to, so a sport that derives its pleasure in how hard one can push his or herself would be much less appealing than something like basketball or football where you can play around without breaking a sweat and get more out of it from a 15 or 20 minute period than going out for a run in the same time window. Upper class people can definitely have stressful, mentally-taxing jobs, but physically they probably have more energy and less kids to take care of, or if they do have kids than their spouse or nanny can keep on eye on them for an hour or two, which is a more realistic time for a worthwhile run.
Obviously there are exceptions, and I tried to explain this in the most impartial way possible but apologize if anything came off as insensitive. That was not my intent.
Other note: realized how long this post is, wrote it after taking my Adderall so it really didn't seem that long at the time. Oh well.