The Spanish Formula 1 Grand Prix that will move to Madrid in two years' time will also host the FIA Formula 2 and FIA Formula 3 races from 2026 to at least 2035.