Flam, an AI interactive content company, has raised $40 million in Series B funding led by QED Investors.…