Learning More CS, Physics, or Math on side as a Physics and Electrical Engineering major
If you want the most fundamental skill, Math is surely the most fundamental as the other sciences are built on top of it to some degree. However, whether the math you learn will impact your future research is debatable. I had a friend with your passion for self study who went off the deep end for about a semester on Group Theory. To my knowledge he hasn't used an ounce of it in his current work, but of course that doesn't mean it was a waste of time.
There is a point after which &quot;getting a head start&quot; has diminishing returns. It's like if you're running a race, but you don't know the course layout, your ability to predict where you should go rapidly diminishes once you leave the starting line. In this case, getting too much of a head start could work against you as you might have fully left the racetrack.
In that case I would simply spend your free time studying what seems most interesting to you in that moment, and let the future take care of itself. If, down the road, you start to think you really do need to brush up on your fundamental CS (or whatever), you can always take the time to study that at that time. The good news is that in most roles you will fill in the future as a scientist or engineer (and many other career paths, too), your job is not to know all the answers, your job is to know how to learn what the answer is.