WASHINGTON—Republican-aligned groups are spending tens of millions of dollars on advertising to build support for the GOP tax overhaul, aiming to sell middle-class voters on the plan and rebut Democrats’ charge that it primarily benefits wealthy Americans.

The spending comes as conservatives are looking to avoid a replay of their effort to repeal and replace the Affordable Care Act, when they were outspent by Democratic groups and failed to convince enough Americans of the merits of GOP legislation, which ultimately failed...