1. Preheat the broiler.
2. Roast the chilies and tomatoes under a very hot broiler until blackened on all sides, about 10 minutes for the chilies and 12 minutes for the tomatoes.
3. Cover the chilies with a clean kitchen towel and let stand for 5 minutes. Peel the chilies and remove the stems and seedpods. Rinse the chilies briefly to remove specks of skin and seeds. Slice the chilies into 1/4" strips.
4. Cool, peel and roughly chop the tomatoes. Set aside the tomatoes and their juices.
5. Heat the oil in a medium-size skillet over medium heat. Add the onion and cook until golden brown, about 5 minutes. Add the garlic and oregano, and cook 1 minute longer. Add the chilies, tomatoes and their juices. Stir until the juices have reduced, about 3 to 4 minutes. Season with salt. Remove from the heat and set aside. (This can be made ahead and refrigerated up to 3 days.)
For the casserole:
1. In a large pot, bring 3 quarts water and the salt to a boil. Add the rice and simmer, uncovered, for about 15 minutes, until all the grains are tender but not mushy or splayed. Strain the rice and spread on a tray to cool.
2. Preheat the oven to 350°F.
3. Spread half the rice over the bottom of a lightly greased 8" x 8" baking dish. Spoon on half the chili-tomato mixture and sprinkle with half the cheese. Spread all of the beans over the cheese. Cover with the remaining rice, chili-tomato mixture and cheese. (This can be assembled a day in advance and refrigerated.)
4. Bake until bubbly and brown, about 20 to 30 minutes, but longer if it was refrigerated. Let stand 10 minutes, then serve.