Genesis 7:13-14 (Judaica): On this very day, Noah came, and Shem and Ham and Japheth, Noah's sons, and Noah's wife and his sons' three wives with them, into the ark. They, and every beast after its kind, and every domestic animal after its kind, and every creeping thing that creeps on the earth after its kind, and every fowl after its kind, every bird of every wing.
Genesis 7:21-22 (Judaica): And all flesh perished that moved upon the earth, among the fowl, and among the cattle, and among the beasts, and among all creeping creatures that creep upon the earth and all mankind. Everything that had the breath of the spirit of life in its nostrils, of all that were on the dry land, died.
From these verses we can see that the kinds of animals which Noah took into the ark with him included the large land animals we'd normally think of, the birds, and the "creeping things", which is the least clear to our modern minds. But from Genesis 7:22 we see that the key criteria is whether the animal breathed through nostrils.
So for example, Noah probably didn't need to take two of every kind of insect on the ark because they breathe through their skin, and were not under the judgement of the flood. Similarly earthworms are hermaphrodites but breathe through their skin, and so didn't need to be taken on the ark.
To my knowledge most non-fish hermaphrodite species are invertebrates, and would probably be excluded both from the ark and from the judgement.