This is usually performed as an answer to the question she’s been posed. It’s usually a “I’m good. Thanks for asking.” Sort of reply. But it occurs to me now as I look at it afresh that it doesn’t have to be that logical. Ophelia’s not really in such a listening state. It could just as easily be an exclamatory “well” as an answer to how she is. It could be a “Well, Glory be. Look who we have here.” A “Well, spit in my eye and call me a seahorse, it’s the King!” a “Well how de doo!”
See, that comma isn’t necessarily important and even if it were, “Well” doesn’t have to be answer to Claudius’ question. She certainly doesn’t say a logical thing AFTER this sentence. She could just as easily not answer him at all.