There are things about the real world that humans do not and cannot know. Purportedly the continental antirealist strain of philosophy has restricted itself to what humans can know and how they know it, turning philosophy into epistemology and hermeneutics and phenomenology. The new breed of continental realists speculate about what the real world might be like outside of human awareness.
Scientific realists explore the real by means of human knowledge. They assume that humans can know something about the real, even if that knowledge is distorted and incomplete. In the absence of knowledge, speculation is the only recourse. The scientist values speculation because it opens up new possibilities for seeking knowledge. The scientist wants to put speculation to the test, incrementally replacing imagination and ignorance with knowledge. For a scientist to ask “but how do you know?” isn’t to substitute epistemology for ontology. The scientist isn’t asking how humans acquire knowledge; the scientist wants to know that your speculation has some basis in the real.
There will always be aspects of the real that are beyond the reach of human knowledge. The more we know, the more we realize that we don’t know, and so the future of speculation is assured. From a scientific realist perspective, the first big mistake is to regard some aspect of the real as permanently insulated from human knowledge and thus permanently consigned to the realm of speculation. An even bigger mistake is to substitute speculation for knowledge as the basis for engaging reality in general: that’s the way of the rationalist, the idealist, the mystic, the fideist.
The scientist’s question is a refined version of what any curious child wants to know. “The kitty will find a good home,” the father asssures the crying child as they leave the stray at the pound. “But how do you know?” Well, you don’t know really: you hope, you count on the odds, you speculate. The only way you can know is to come back to the pound in a month, find out what happened to the kitty, go interview the kitty’s new owners, inspect the kitty visually. Of course even then you aren’t 100% certain that the kitty has found a good home. But at least you’ve replaced some of your speculations with knowledge.