Fundamental electronic and structural properties of carbon onions in extreme environments