Alibaba Group Holding Ltd.’s shares surged to their highest in nearly four years after revealing plans to ramp up AI spending past an original $50 billion-plus target, joining tech leaders pledging ever-greater sums toward a global race for technological breakthroughs.