Clearly they are Jewish and their ancestors were part of The Madagascar Plan, where Nazi Germany was forced resettling Jewish people in Madagascar.
They have largely been isolated and weren't able to keep apprised of what happened after their family was resettled. Germany had been really pushing to establish a military base in Antarctica for decades, so the penguins had the understanding that Germany must be well established there by the time they got there.
So that is why Penguins from Madagascar would believe that people in Antarctica would be speaking German.
They are originally from Antarctica and only end up in the zoo in the USA, however this only occurs in the Pinguins of Madagascar, which came out after the original Madagascar, so their origin story could have been thought up differently by the writers of the Madagascar movie than how it happened in the Pinguins of Madagascar movie