Haxe is not dynamically typed, it can compile to dynamically typed platforms, but it can also compile to statically typed platforms while remaining statically typed.
For switch it uses Hashlink/C code generation so it's native C that is compiled on the console.