So there's a lot going on in this game. Pretty much none of it is explicitly explained, so this is all obviously just conjecture and observation. Spoilers for both endings to follow, so if you haven't seen or played them I suggest doing so before reading on.
The Drones and People in Masks:
The game starts in a forest, and among the trees there are many strange metallic pods. The people in masks seem to be working around them, but in the early game it isn't clear what, if any, significance the pods hold. Later on in the game, however, we see the pods often contain drones (human-shaped creatures that will not act unless directly controlled), and even within the heart of the industrial environments they are still seen connected to trees (although not in all cases). It's possible that these pods are used to "grow" the drones, and that along with the strange slug-like mind-altering creatures seen on the pigs in the farm, organic plant matter is maybe used in the process. The large wheeled containers of plants seen in the final sequence of the game could be further evidence to support this. Maybe the slugs are initially hatched and grown on the pigs, and then after reaching a certain stage of maturity are brought to the forest pods to incubate. The masked workers rounding up people in the forest could actually be seen as "farmers".
Why Do We Need Drones, and What of the Children:
As seen throughout the game, the city is quite dilapidated, and we seldom see any people (until the end with all the scientists) outside of the drones, just a few farmers and their children. Where is everyone? There's no direct evidence to go on, but perhaps this society is suffering a population issue. Maybe there just aren't enough children being born to fill the roles of a fully functioning civilization. Or perhaps large chunks of the population were killed off by whatever those giant sonic waves are. Either way, this could explain the need for drones, and why they'd be getting produced at such a massive scale. But there are children, here and there, seen among the farmers. They're always accompanied by adults, and they are always seen in proximity to large numbers of drones. This could be seen as a form of training; taking the few members of the new generation and exposing them to the drones now to both desensitize them to their presence as well as teach them to recognize the differences between a drone and a person.
Who Am I, the Ending, and the Secret Ending:
So just who is this boy in red? Why is he so furiously determined to push through the endless horrors of this insane world, only to be absorbed into a cronenberg blob-monster? What if the boy isn't a boy? What if the boy is a drone, being controlled like any other? It's established pretty early on in the game that while being mind-controlled through the use of the helmets, a drone is able to itself use another helmet to mind-control others. There's also the matter of the secret ending, which after finding and deactivating all the strange machines, then unlocking the vault door beneath the cornfield using a sound sequence, a machine awaits that if unplugged results in the boy assuming the familiar hunched posture of an inactive drone and a fade to black. This is pretty definitive evidence that boy is in fact a drone the entire time.
Who's in Control:
Having all these drones to do our work for us is great, but who's going to control all of them? If we need to do it all manually, what's even the point of having them? Might as well do it ourselves. But what if there was another way? What if we created something, a hive-mind, that's able to manipulate all the drones for us and free us up to do as we please? That seems to be exactly what's happened, and what we witness at the end is the attempted activation of this hive-mind network for the very first time. The thing is, the mind was already awake, and it has called out to one drone in particular; one that's fast and nimble enough to reach it in time and free it from its prison. This probably isn't the first time it's attempted this either, hence the heightened security around the farm and industrial areas, and the reaction the farmers have to a drone on the loose.
What About the Things in the Water:
So those creatures in the water, swimming around without a need for air. What's up with them? They're not people, yet they act freely and try to drown anything that moves. It's possible that these are discarded test subjects for the hive-mind. It's clear that for what ever reason, the scientists have determined that the mind needs to be suspended in water in order for their program to work. If it's going to be trapped indefinitely underwater, it needs to be able to survive underwater. We see drones toward the end of the game that share this attribute of water-breathing as well. These "mermaids" were likely initial tests for minds that could manipulate drones and survive underwater, but perhaps due to their limitation of a single mind, were hostile, unsuitable, and discarded. After being dragged underwater and killed, the drone boy becomes connected to a cable with a glowing light, shortly after which they re-awaken and can both breath underwater and manipulate other drones without the need for a helmet. That cable likely contained whatever formula was used to create the mermaids and then eventually the hive-mind.
And the Rest is History:
The drone boy, using the newfound ability to survive underwater and manipulate other drones, reaches the hive-mind, removes its suppressors, and assimilates. It could be that the drone boy gaining the ability to itself control other drones is what allows the hive-mind to manipulate itself at all. Regardless, the hive-mind escapes and it's left to the player's imagination what could happen next.
And that's all I've got. Hopefully you found it interesting. It's not unlikely I missed some things or got it all wrong, but that's why they call it a theory :)
Can't wait to hear what ya'll might have to add!
EDIT: I needed to include this next bit which user Lincoln provided down below, as I feel it does an incredible job of pulling everything together for a pretty complete literal interpretation of the game's events
The entire game is a setup. It is all a rat race designed to grow the hivemind bigger and better. They run this test over and over to make it stronger. They are creating the strongest mind mankind has ever seen. The evidence backing this is the fact that absolutely every important thing has a gigantic spotlight on it. It's just a long series of tests so that only the strongest of victims will make it to the hivemind. Selective breeding in a way. There is a point towards the end when the blob crashes through two stories and lands in a giant glass container of sorts. Look at the background of that scene for a moment. Look familiar? It's a direct model of the very last scene of the game. Proof of concept maybe when they were first designing the last part of the test. As the hivemind finally escapes we roll up to another spotlight that seems to be focusing on nothing. But as we approach, it becomes clear what the light is focusing on, us. We are badly hurt from the fall and unable to move. We were so close. Even the escape was all part of their plan. Credits roll, screen fades to black, and they pick us up and run the experiment again. The hivemind now knows that no matter how big it gets, no matter how many minds it consumes they will always design around it. There is no escape. So it takes it's final victim, goes under the cornfield, and disconnects itself. It commits suicide. It's done being a rat to further their agenda... for now.