Technology giants suffered a brutal sell-off on Thursday after heavy AI spending by Tesla and Google spooked investors.