Avoiding sogginess when cooking zucchini and squash largely involves managing their high water content. The first tip is to give each vegetable piece enough room on the pan, allowing moisture to evaporate rather than get trapped and steam the vegetables. Roasting at high temperatures helps too, as it quickly dries the surface moisture, leading to a crispier, caramelized exterior. You can also pre-salt the vegetables for about 15 minutes before roasting. This salting technique draws out some moisture, which you can pat dry before adding oil and other seasonings, leading to a less soggy result.