There has been a ton of research into how different animals experience pain. You are correct that we don't know how they experience it, but based on nervous system structure and other behavior, we can make some conclusions about the nature of the pain and whether it's a basic avoidance mechanism or something more complex that would involve suffering.[1]
That said, I think a good rule is to not cause unnecessary pain/suffering in any living thing (e.g. if trapping rodents, use something that leads to a humane death).
[1]https://en.wikipedia.org/wiki/Pain_in_invertebrates