Late to this discussion. I went to a so so HS and then an Ivy back in the day. My preparation was uneven, but I was smart and motivated. Boarding school kids had an easier time at first because they were used to the workload and expectations (and had friends from HS on campus), but after a year or so I had caught up to them. Someone mentioned professors liked students like me because we were less jaded and I think that is true.
My kids’ HS was better than mine but was still not top notch. One kid went to the state flagship and did fine, the other chose a LAC and started slowly. I briefed him on my experience, telling him I was every bit as smart as those other kids, but was not as well prepared. He took the advice to heart and his grades went up as he figured out how to study and what the expectations were. This child slept through his stats and US history courses in HS, still making As and high AP score. In college he did not sleep in class, did the reading, and worked to make the class a success, showing up and participating in discussions.
It is not too late for your older kid. The younger one? I wouldn’t overreact to the problem. You know now there might be one, so can shore up his skills.