Preheat your oven to 350°F (175°C).
- Rinse the rice in cold water to remove excess starch.
- In a medium saucepan, bring 2 cups of milk to a boil over medium heat. Add the rinsed rice and reduce the heat to low. Simmer for 10-12 minutes, or until the rice has absorbed most of the milk but is still slightly firm.
- Remove the rice from the heat and set aside.
- In a separate bowl, whisk together the remaining 2 cups of milk, sugar, vanilla extract, salt, and cinnamon (if using). If using an egg, beat the egg separately and gradually add a small amount of the warm milk mixture to temper the egg before whisking it into the full mixture.
- Stir the milk mixture into the partially cooked rice. Add butter for extra richness if desired, and stir until combined.
- Pour the rice pudding mixture into a greased 9×9-inch (or similar) baking dish and smooth the top.
- Bake in the preheated oven for 45–55 minutes, stirring once or twice during the baking process, until the pudding is golden on top and the rice is fully cooked. It should be slightly set but still creamy.
- Remove from the oven and let it cool for a few minutes. It will continue to thicken as it cools.
- Garnish with a sprinkle of ground nutmeg or cinnamon before serving, if desired.