Preheat the oven to 320°F/160°C. Butter an 8x8-inch baking dish.
Heat the olive oil in a large skillet over low heat. Add the garlic, scallions, and chilies and cook, stirring, until fragrant, about 2 minutes. Transfer to a large bowl.
Add the spinach and kale to the same skillet and cook over medium heat, stirring, until just wilted, 3 to 4 minutes.
Add the cooked rice, 1 cup cheddar, ricotta, sour cream, wilted greens, salt, and pepper to the bowl with the garlic mixture. Stir until evenly combined.
Transfer the mixture to the prepared baking dish and spread into an even layer. Sprinkle the remaining ½ cup cheddar on top.
Bake on the middle rack until the cheese is melted and golden at the edges, about 20 minutes.
Let rest 5 minutes before serving.
Notes
Leftover, cold, day-old rice holds its shape better in the bake than freshly cooked rice.
Squeeze excess water from thawed frozen spinach or kale before adding to prevent a watery casserole.
Salt amounts are based on Diamond Crystal kosher salt; if using Morton, use about half.
Store leftovers airtight in the fridge for up to 4 days.
Reheat covered in the microwave or in a 350°F oven until warmed through.