No, energy won't be free with "enough solar panels". There's this thing called night. And seasons. And transmission losses.
Paper grocery bags give off gas when they rot, whereas the (smaller) amount of energy in a plastic grocery bag is carbon locked in a controlled landfill. I think there’s a strong argument for plastic bags being more environmentally friendly.