Is this an example of lower image quality due to lower quality glass, or something else?
Without showing us specific examples it is hard to conclusively say what the difference is in your case, but it probably is due to your 24-70mm f/2.8 being a sharper lens than your 18-140mm lens.
When used with proper technique the AF-S NIKKOR
24-70mm F2.8G ED is certainly capable of producing sharper results than the AF-S DX NIKKOR
18-140mm f/3.5-5.6G ED VR.
With regard to "quality of glass" it depends on specifically what you mean by that phrase. Some people use the word "glass" interchangeably with the word "lens." In that sense the 24-70mm f/2.8 lenses are "better glass" than the 18-140mm DX lens when talking about the image quality they can provide.
But it has more to do with the overall optical design of each lens than how high the quality of the actual glass is that is used to construct such lenses. It's easier to design a lens with less than a 3X zoom factor between the widest and longest focal length than a lens with a 7.8X zoom factor. It's also harder to design an 18mm lens than a 24mm lens for use on a camera with a lens registration distance of 46.5mm. The wider f/2.8 aperture of the 24-70mm lens does require more correction of optical aberrations to give good performance at the widest apertures, but this also gives the lens even better performance at stopped down apertures that are equivalent to the 18-140 with its narrower maximum apertures. Even if both lenses each had glass elements that perfectly matched the designed "blueprint" for each lens, the 24-70mm would be expected to perform better than the 18-140mm. In practice, the difference could be even greater as manufacturing tolerances for a more expensive 24-70mm f/2.8 lens might be a little tighter than for a consumer grade "all in one" lens.