Net metering is classic privatize-the-benefit-but-socialize-the-cost. You are using the grid as a giant battery without paying for a battery, its installation and maintenance.
An honest comparison would only judge the externalities of solar in the light of the externalities of fossil fuels it is replacing, and not in isolation as you are doing.
While solar may use the grid as a giant battery, fossil fuels are using the atmosphere as a giant garbage dump. One of these is obviously much worse.