Heat the oven: Preheat to 350°F (175°C). Grease a 9x13-inch baking dish.
Mix the dry ingredients: In a bowl, whisk the sugar, flour, and a pinch of salt until evenly combined.
Combine the filling: In a large bowl, add drained pineapple, reserved 1/4 cup pineapple juice, and the sugar-flour mixture.
Stir until the fruit is evenly coated. Fold in the shredded cheddar. If using vanilla, add it now.
Assemble the casserole: Pour the pineapple-cheese mixture into the prepared dish and spread it into an even layer.
Make the topping: In a medium bowl, combine the crushed crackers with melted butter.
Stir until all the crumbs are moistened.
Top and bake: Sprinkle the buttery cracker crumbs evenly over the filling. Bake for 25–30 minutes, or until the topping is golden and the edges are bubbling.
Rest and serve: Let the casserole sit for 10 minutes to set slightly. Serve warm as a side or dessert.