Your casserole may be soggy due to excess liquid. The most frequent culprit are the hashbrowns. When using hashbrowns, make sure they are fully thawed and as much extra liquid is removed as possible.