Going by Paxman and Harris, Imperial Germany did resort to disease weapons in the First World War- on American soil no less, attempting to poison draft horses being sold and shipped to the entente. Perhaps someone remembers?
According to Ken Alibek, there was a major tularemia outbreak around Stalingrad that had the distinct appearance of unnaturality about it, August '42; so Germany has been in the biological weapons game, as perpetrator and victim.
So yes, quite within the bounds of reality, to the point where, like their stocks of nerve gas, the question becomes why they didn't.
The mechanism is distinctly questionable, though- how precisely do you infect someone with a U-boat? Granted the things themselves were hellishly unhygenic and you probably would come down with something serving on one, if the depth charges spared you long enough, but that's not really a reliable vector.
What are we talking about here, landing operatives? Shell fire with toxin rounds? What biological agent? The devil is in the details.