Yes,
you should check that, for any class.
The class of the amplifier is not related to gain.
Also, pro
line level is higher than consumer line level so some pro amps (usually with XLR inputs) may not have enough gain/sensitivity when used with consumer equipment. But "line level" isn't usually calibrated (especially at home) so you have to check the specs of the amplifier and whatever is driving it, especially if the amplifier has XLR inputs.
I answered OP's question: "When buying an amplifier, all I have to look into is the wattage rating at low/high/whatever impedance, right? Or are there other factors which affect the delivery of the said watts?"
I also said: "I'm not saying this applies to all of the Class-D amps." I'm aware that the class is not inherently related to gain. I am sharing the useful information that it can be a common issue with this category of products.
You should check the specs of anything you buy, but my point is that these low-price class-D amps are often coming with the
wrong gain structure for their most common intended use. I'm aware of these details, I read the specs, and so I chose not to buy these products.
Most of the customers who buy them won't be able to use their rated power, and frankly, they really shouldn't have to read the specs for it to work as expected like almost any other consumer amp does. Do you not see the problem with that? If it comes with only RCA inputs, the customer can reasonably assume it is calibrated properly for devices with typical RCA outputs. Why wouldn't it be! They're the type of low-price, simple consumer product that probably will not be used with a preamp, which typically would cost more than the amp itself. Nobody wants to buy a preamp, AVR, or headphone amp just to boost the input voltage to these products just to make them work. They might be suitable for use with preamps and AVRs, but let's be real, that's not how they are marketed and not what most people use them for.
Thankfully, many of the newer products in this category do have a better gain setting or a gain switch. This is much less of a problem than a few years ago. That still leaves a landscape of products that look almost identical to most customers yet work very differently.