Mix together cooked rice, cooked beans, garlic, onion, and chiles. In a casserole, spread alternating layers of the rice-beans mixture, ricotta cheese, and jack cheese, ending with a layer of rice and beans.
Bake for 30 minutes. During the last few minutes of baking, sprinkle cheddar cheese over the top. Garnish before serving.