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.