To first order, the relative abundances of the heavier elements to iron (for instance) are constant. So the metal content of a star is shorthand for the content of any element heavier than He. We now know this is not true in many circumstances and elements can be grouped by synthesis process - for example we can talk about "alpha elements" - O, Mg, Si etc. produced by alpha particle capture; or s-process elements - Ba, Sr etc. produced by the s-process. We know that the ratio of say O/Fe gets larger in more "metal-poor" stars, but Ba/Fe gets smaller. So talking about a single "metallicity" parameter only gets you so far, and the truth is more complex (and interesting).
The next point is why they are referred to as "metals" rather than another term like "heavies" or something. I would guess this is down to a bit of history and the fact that initial abundance analyses in stars were (and still are on the whole) done in the visible part of the spectrum (e.g. in the early part of the 19th century by Hyde Wollaston and Fraunhofer). The most abundant elements heavier than He are in fact not metals; they are Oxygen, Carbon, Nitrogen and Neon. However, the signatures of these elements are not at all obvious in the visible spectra of (most) stars. Whereas the signatures (absorption lines) of elements like Fe, Na, Mg, Ni etc., which decidedly are metals, are often very prominent.
Thus, there is a reason and some history behind the name "metals". It is that apart from hydrogen and helium, the metallic elements have the most prominent features in the optical spectra of stars, whereas in most stars the signatures of the more abundant non-metals are hard to see.