Add oil to a large skillet and heat over medium. While oil heats, mince garlic and chop onion.
Once the oil is hot add the garlic, onion, corn, and chilies to the skillet; sauté until onion is tender, approximately 6-7 minutes. Add the rice, spinach, and 1 cup of the tomato sauce. Stir to combine and allow the spinach to wilt.
Drain and rinse pinto beans. Combine with the remaining tomato sauce and the salsa. Set aside.
Preheat oven to 350° F.
Using a 9-inch square pan, spread 1/2 of the salsa mixture into the dish. Place 3 tortillas over the salsa as you would lasagna noodles (they may slightly overlap). Next spread with half the rice mixture. Repeat with remaining ingredients and top with shredded cheese.
Bake uncovered for 45 minutes or until heated through and bubbly. Serve with grapes on the side.