Preheat the oven to 375 degrees.
Coat a 9"x13" pan with cooking spray.
Melt the butter in a medium pot over medium heat.
Add the onion and cook for 3-4 minutes until translucent and taking on color.
Add the flour to the pot and stir to coat the onions; cook for 1 minute to cook the flour taste out of the roux.
Slowly whisk the milk into the pan.
Cook, stirring occasionally, for 4-5 minutes or until sauce has thickened (coats the back of a spoon).
Add the cream cheese, 2 ½ cups of shredded cheddar cheese and the salt, pepper to the sauce.
Lower the head and stir until smooth.
Place the rice, chicken and peas (or other vegetable) in a large bowl and stir to combine.
Pour the sauce over the top and toss to coat evenly.
Pour the mixture into the prepared pan and smooth the top.
Sprinkle the remaining cup of cheese, crushed crackers and if using , the ranch dressing powder over the top.
Bake for 30 minutes or until casserole is bubbly, topping is browned and cheese is melted.