To the OP:
Most likely you will no longer be at the top of your class. While college was a melting pot of individuals with different goals, medical school is a homogeneous group of people with a single goal who endured the application process with at least the minimal level of neuroticism required to check off the boxes and get accepted. You are no longer competing against people whose goals are to work for the federal government, to major in forestry, to work in their dad's law firm, to do the minimal amount of work to get a finance job somewhere, or to be a dancer in a professional stage production. Every single one of your classmates from this point forward is trying to be a doctor, and nearly all of them have the capacity to be in top quarter of the class if they put the effort in.
I can break medical school students up into 5 groups. One majority and four minorities.
1. There are a handful of people in medical school who have no concept of balance and will study every waking moment, go to every class, read every non-mandatory reading and will score in the top 5% of every medical school exam and USMLE. These people aren't necessarily gunners, they may want to do something like pediatrics, but they are extremely focused, not because they are neurotic, but just because that's who they are -- they don't get stressed out by school, they don't worry about whether they will match, they don't compare themselves to their peers, they don't have many other interests in life -- they just calmly and cooly kill every single exam.
2. There are another handful of people who are naturally brilliant and could remember what they had for dinner every night for the past 10 years, approximate the square root of 700 in less than a second, and can skim through Robbins and retain most of it. Again, these people aren't necessarily gunners. They are just gifted.
3. The majority of the people are smart, hardworking, and will have the same exact fears as you. They will not be at the top of their class, but they won't be at the bottom either. They will study hard and score average on their exams. They will match in every type of specialty from pathology and psychiatry to dermatology and plastic surgery. They will attempt to lead balanced lives. These are probably ~80% of med students. Whether a student ends up in the 10th percentile or the 90th percentile will largely correlate with the amount of study time he puts in, but in the end it will make little difference in his career.
4. Then there is another small group of people who are gunners. Gunners are not naturally brilliant. They do not neurotically study every waking moment. They do not score at the top on every single test. Gunners are the unfortunate group of people who are focused on winning public praise and entering only highly competitive specialties to "beat" everyone else. They attempt to gain unfair advantages by cheating, using medications, sucking up to attendings/professors, publicly trying to put down other students/competition, and getting their name out there as much as possible. They may or may not be successful. They were unbearable as premeds. They are unbearable as med students, and they will be unbearable as residents and attendings.
5. The last minority are those truly deficient academically. They consistently fail exams either due to a lack of motivation or interest or due to simply a lower IQ or educational background. Somehow they got through the admissions process, and there will be a couple of these in every class. Your worry is that you are one of these people, and you almost certainly are not given your insight to at least have the worry in the first place.
The point to all this is that you will most likely fall in the 25-75% grade distribution in your class and have your pick of whatever specialty you want. The fact that you are even worried about this in the first place is evidence that you are most likely in the majority and not in one of these four minorities of student types. Work hard while maintaining balance and try to be pleasant and you will be ok.