Just as you are implying in your question, different universities have varying reputations as being better or not so good as others. I think that you should also consider that when taking your online program. A degree from a university with a good academic reputation will probably be looked at more favorably than one without that excellent reputation.
If you are planning to attend a top graduate school after earning your undergraduate degree, it would be a good idea to check out their admission requirements so that you can begin to plan to acquire some of the required documents such as letters of recommendation while you are studying for your undergraduate degree. A reputable school and teachers who support and encourage you to reach your highest potential will go a long way to helping you achieve your goals whether you take courses on campus or online. Harvard itself offers both undergraduate and graduate programs online now so I am sure they take online degrees seriously.
You could also e-mail the university you are interested in and ask them that question. With your high ambitions, it would be best to be sure before you begin this journey. Good luck to you and let us know how you are doing.