I'm trying to understand this the best I can. First off, I'm struggling trying to understand how you made such a huge hole using anchors?? Depending on what you are going to put on the shelves, they make anchors that should hold up just find under pretty descent weight - Primarily the steel anchor hollow wall anchors
However, there are other ways as well.
What size is the closet and what size shelves are you putting in. If you are installing deep enough shelves, and there are studs somewhere in the wall, like toward the front of the closet, you can use horrizontal pieces of wood, something like 1.5-2" or so and make little tables for the shelves to sit on. You know, installing the wood horizontally along each wall, right, left and rear, so that the shelf could sit down on the top edge.
As far as installing a stud to screw into, I'd try other things before I started tearing apart my walls to install a stud.