I'm sorry this has happened to you OP. How awful.
i know a bit about the logistics of trials and the publicity surrounding them. Depending on what area you're in, any trial or at least its result is likely to appear in the local media. Unless you're a public figure, it's extremely unlikely your identity would be reported, but obviously local people would already know that you were married to the defendant who would certainly be identified.
The fact your husband seems to have admitted he has done this stuff suggests he will be pleading guilty. A court may take diagnosed mental health conditions into account during mitigation for sentencing but they'll give short shrift to a defendant who says they've committed their crime because of some spurious, undiagnosed mental health issues because they think it will get them off the hook. It won't. I've seen judges scoff at people who come up with such excuses for their crimes. Using made up mental health issues is the most common excuse I hear in court.
If your husband does plead guilty then it's unlikely he will be able to play any part in your family life in the future. I don't know the exact charge, but if he's convicted of sex crimes against children then he's not going to be allowed unsupervised contact with yours again, and nor should you even consider it.
However painful it may be, I'd urge you to go to court to hear what is said. I've been to so many hearings where the defendant has minimised what has happened to their family, and the poor wife would have had literally no idea of the extent of the crimes if they hadn't sat in court and heard it with their own ears. It may help you to come to terms with just how horrific these crimes are and how their victims suffer. It may also help you to make the break away from him and to stop considering that there may be some future for your marriage.
None of his is your fault OP. I can't imagine how confused, hurt and betrayed you must be feeling. In your shoes, I'd want to move away and start again while my children were young enough to do so. All the best of luck to you.