Preheat oven to 300°F (150 degrees C).
Bring a large pot of lightly salted water to a boil; cook cauliflower until tender yet firm to the bite, about 10 minutes. Add green beans; cook until tender, about 5 minutes. Drain.
Place bacon in a large skillet and cook over medium-high heat, turning occasionally, until evenly browned, about 10 minutes. Drain bacon slices on paper towels, reserving bacon grease in the skillet.
Cook and stir onion in the skillet with bacon grease over medium heat until tender and lightly browned, about 10 minutes.
Mix cauliflower, green beans, bacon, and onion together in a casserole dish.
Stir butter and mayonnaise together in a bowl; pour over cauliflower mixture. Stir to coat; top with mozzarella cheese.
Bake in the preheated oven until cheese is melted and bubbling, 20 minutes.