If I declare my major when applying to MIT as earth sciences, will I be able to change my major into engineering once I get in? Is it hard to change?
The major you write when you’re applying is just to let the admissions officers get a sense of your interests. All freshmen at MIT are officially undeclared in terms of majors until they declare a major in the late spring of freshman year (or later, if one is still undecided at that point), and they can declare any major they wish, no matter what they wrote on the application.
Changing majors isn’t too hard, as long as you do it early enough (e.g. if you suddenly change from Course 18 to Course 16 by junior year, you’re gonna have a hard time graduating in 4 years).
Actually changing majors isn’t hard at any time. If you really wanted, you could change majors in your senior year, but as @MITer94 notes, that will make it hard to graduate in 4 years. All you need to do is to fill in a form. Lots and lots of MIT students end up changing majors.
MIT works on the assumption that most incoming students do not really know what they want to do. Nobody chooses to major in Nuclear Engineering after the great experience they had with their high school reactor. It just doesn’t happen. Even for those kids who come in knowing that they really love (say) Chemistry, then it is still not often clear to them whether they want to major in Chemistry, or in Chemical Engineering, or in Materials Science (which is basically inorganic chemistry). So they experiment, they try it out. They try a UROP in their prospective field, and usually sometime in their Sophomore year, they figure out a major, often not on their first try.
The corollary to this, is that everyone is admitted to the university rather than to any course, department, school, or program. So the admissions requirements and what the admissions officers look for are exactly the same for those intending to major in Architecture, Philosophy, or Mechanical Engineering.