The AI and cryptocurrency sectors are bankrolling hundreds of millions of dollars in advertising to shape public opinion and elect allies to Congress and key state offices in the midterm elections.