To do it in place, one option is to try to get a drill in there with a 1" spade bit (or hole saw will make a cleaner hole) but I don't think the drill will fit between the two shelves in order to make a straight hole. First hole will be easy, you can do it from the bottom but the 2nd one will be harder.
Honestly I'd just take them down, it's just 4 screws per shelf. If the screws don't go in properly anymore just add a bit of glue in the hole to help it take better. The shelf is just sitting on the bracket, so the screws are only there to stop it from moving further, they're not holding all of the weight. Don't touch the screws going into the wall, you just need to take the shelf off the bracket and put it back.
Actually, another option if you absolutely don't want to take down the shelves, is to install an electrical outlet in the wall at the shelf you want. You will need to find a place to feed power from, either the attic or basement, or whatever area is easier to access. I personally always do basement, as I can drill down with a long bit to help line up my hole into the joist cavity to run the wire. You would want to install another outlet at the bottom too, so you have a place to drill down from. You can then decide what to do with that hole, another outlet, or just run wire straight up, and patch the hole.
If you really don't care about it being janky you can also punch a hole through the wall entirely and feed it from whatever is on the other side, assuming it's not an outside wall. I personally wouldn't do it that way, but it's an option.