No, there aren't really a lot of serious health concerns. Cut the carpet into strips, roll up each strip and carry it out.
The reason why your carpet smells is exactly the same reason why a dog smells when you wash him/her.
It's because over the years, dust (like dead skin cells, hair, paper fibers, pollen, etc.) have accumulated in the pile of your carpet along with food and drinks spilled on it, and when you get that organic mess wet, you create a bacteria's idea of heaven; plenty to eat and wet conditions to allow good mobility so the bacteria can divide and multiply.
When a carpet starts to stink when it gets wet, it's because all of the organic matter in the carpet provides a food source for the bacteria inside the carpet. The resulting population explosion in the bacteria is what's causing the smell, and it's an indication that your carpet is past the end of it's useful life.
Purebred show dogs don't stink when you wash them because they get washed often enough that their coats are clean and free of organic matter that bacteria would feed on. But, your typical house mutt that rolls around in anything with an interesting smell has a coat of fur that's full of organic matter, and when you wash a dog like that, all of that organic matter becomes a food source for the bacteria in the dog's fur. The resulting population explosion of the bacteria inside the dog's fur coat is what makes the dog smell, and that smell that you can smell is 10,000 times more intense to the exquisitely sensitive nose of a dog, which is why he really doesn't appreciate being bathed in he first place.
When carpet cleaning contractors are asked to clean a carpet they can see is going to stink to high heaven when it gets wet, they add a germicide to their cleaning solution so that it kills any bacteria it comes in contact with. By using a germicide in the solution tank and killing all the bacteria in the carpet, you prevent that smell by preventing the bacteria from multiplying. But, the bottom line is that your carpet smells cuz of all the organic matter that has collected in it, and you realistically can't get that organic matter out of that carpet even with the best carpet cleaning equipment. You really need a new carpet.
The brown spots are just the dirt in the carpet that got brought to the surface by walking on it when it was drenched.
The smell will continue until the carpet starts to dry out and the bacteria become dormant once again. That can take anywhere from two weeks to two months depending on how wet the carpet got and whether there was a foam under pad under it that also got drenched. Your best bet is to put a dehumidifier or air conditioner down there to dehumidify the room and remove moisture from the air, and hence the carpet. Every quart of water that a dehumidifier or air conditioner removes from the air is another quart of water out of that carpet.
Regardless of what you read or hear, the carpet extractors and shampoo'ers that professional carpet cleaning contractors use to clean carpets can't remove the dirt that gets deep down into the pile of the carpet. The tools professionals use are great at removing dirt that's at or near the top of the pile of the carpet, but nothing will get the really deep stuff out. Your best bet, then, in preventing your new carpet from following in the footsteps of your old carpet is regular vaccuuming. Regardless of what Rug Doctor, Easy Off, Hoover, Eureka, Bissell and other manufacturers of those mini-carpet shampoo'ers say, the best way to maximize the life of your carpet is be regular and frequent vaccuuming to remove the dirt and organic matter that settles on the carpet.
Hope this helps.