Yes you can freeze a broccoli and cheese casserole without it turning soggy or mushy when thawed out.
I freeze some broccoli and cheese casserole a lot and what I do is put the broccoli and cheese casserole into a freezer proof container and the casserole wrapped in plastic wrap tightly.
The casserole will then last for a few months or longer in the freezer and will stay fresh and good to eat without being mushy or soggy.