Do I create a Gold Gear with Wage of Pain if target is no longer valid?

Yes, you will still create the Gold gear token even if the target of Wages of Pain becomes invalid.

According to the FAQ regarding Wages of Pain:

"Wages of Pain WILL still give the gold token even if the target becomes illegal. [...] Wages of Pain's gold token generation is a separate instruction after a full stop that doesn't reference target information, so it executes even when the damage cannot be dealt."

This is consistent with Rule 356.3.e.6, which states that instructions that cannot be followed are ignored, but instructions that do not reference target information are still executed. Because the creation of the Gold gear token is a separate instruction that does not depend on the success of the damage, it proceeds regardless of the target's status.