Sadly (or not, depending on if you hate bugs) most of them do in fact die. They breathe through tiny holes throughout the outside of their body called spiracles (they don't have lungs) so essentially their whole body becomes flooded with water and all the other chemicals we have in our sewage. For the most part, any bugs you're finding in or around your home are gonna die when they're flowing through your septic tanks. Aquatic bugs are a different story but its not likely you'll have those near your home. Unless you live near a swamp or some shit.
If they make it all the way through they might just live in a shitty heaven for a little bit and eat what they can but even still they get trapped in there and die.