Why is the nosewheel of the MiG-29 placed in front of the engine intakes?
The MiG-29 series of aircraft are designed to operate from poor quality airfields, and for this reason, they feature separate air intakes for use while moving on the ground.

See this article, including pictures of the aircraft:
https://www.airforce-technology.com/projects/mig29/

Notice the additional louvre-shaped intakes on top of the aircraft's leading edge extensions.

Quote from the article:


  The MiG-29 is the world’s first aircraft fitted with dual-mode air
  intakes. During flight, the open air intakes feed air to the engines.
  
  While moving on the ground, the air intakes are closed and air is fed
  through the louvres on the upper surface of the wing root to prevent
  ingestion of foreign objects from the runway. This is particularly
  important when operating from poorly prepared airfields.


In general, aircraft designers will have to consider factors such as the aircraft's weight distribution and center of gravity when choosing a position for the landing gear.
If you compare with other fighter aircraft of similar layout and configuration, such as the F-15 or the F-18, you will notice that most aircraft have the landing gear approximately in line or in front of the air intakes, mostly because either changing the landing gear position or the length of the air intakes only to move the landing gear behind the air intakes would likely create other problems, such as undesirable taxi characteristics, unstable takeoff/landing roll or undesirable aerodynamics in flight.
The configuration where the landing gear is approximately in line or in front of the air intakes, on the other hand, has been used successfully on many existing types, so it can be assumed that there are no major problems that would be solved by moving the landing gear further back.

As it can be seen on the MiG-29, there are also other ways to avoid specifically dirt or foreign objects ending up in the air intakes during takeoff and landing.