AI spending has been a key engine for the market, and some investors now worry that it could stall out, one expert says.