Medicated feeds in the US are typically medicated with a coccidiastat, Amprolium. Its not an anti-bacterial, and anti-viral, or anthing like that. Its a Thiamine-antagonist, and disrupts coccidia's ability to take up the thaimine it needs to thrive, allowing your birds digestive system to keep coccidia in check. Once your bird's immune system is fully developed, its generally not needed (and arguably, isn't needed ever - its insurance, not a mandatory measure). Coccidia are present in essentially every environment humans have been - you can't get rid of them, only keep them under control - much like the mix of good and bad "bugs" in your own gut.
There is no withdrawal period for Amprolium, you can eat eggs from chickens fed medicated (with Aprolium) feeds - and if you've ever eaten supermarket eggs, you likely have. Battery hen operations have provided medicated feed all the productive flock's life for literally decades - it was being studied in the early 70s, when the decision was made regarding withdrawal periods, and is re-assessed periodically.