There are creatures, such as the hunter shark, which has a 40-foot swim speed and a 0-foot "normal/walking" speed; it's longest range attack is 5 feet. Does this mean you could (by some means) drag this creature onto land, and then stab it with a reach weapon?
To me this is just somewhat of a disconnect (though I know 5e is not simulationist) since a creature with only a "walking/normal" speed can swim through the water but a creature with only a swim speed cannot walk on land.
If you'd like a creature that can more reasonably survive on land there is the dolphin and the ixitxachitl, which can breathe even on land.
Can a creature with only a swim speed even move while on land?