Which one for computer science and engineering?
MIT for computer science, and it is not close on the technical depth or the density of research opportunities. For engineering generally, MIT is also stronger on the technical side. Harvard is stronger when you want a liberal arts foundation with engineering options, or when your interests sit outside engineering entirely, such as economics, government, or the humanities.
That difference is about structure rather than subject lists. MIT is built around a laboratory culture where an undergraduate can be in a working research group, and the course catalogue is narrow and deep. Harvard is built around a general education requirement, so an engineering student there also takes many courses outside engineering. Both are strong in computer science by any measure, and the deciding question is whether you want depth in one field from the start or a broad base that turns into depth later.
Both are excellent for computer science by any ranking, and our guide to the best computer science colleges in the US shows where the two sit against the rest of the field, including the public programs that deliver the same outcome for a fraction of the price. Our guide to whether a software engineering degree is worth it covers the return question for either choice.
How do you decide?
Visit both, on a weekday, and pay attention to the teaching. Sit in on a large lecture at one and a seminar at the other. Then do the honest version of the money question, which is what you would actually pay and what you would earn. If the two schools cost the same to you and the programs are equally strong, the choice is which student you want to be for four years, and that is easier to answer after a visit than from any ranking.