*
"I don't like this," I said.
She hadn't heard me.
*
Can the "hadn't heard" be replaced with "didn't hear"?
*
"I don't like this," I said.
She hadn't heard me.
*
Can the "hadn't heard" be replaced with "didn't hear"?
"She didn't hear me" would be grammatical, and is more likely the correct form in the given example. The choice depends on exactly what you mean.
It would be correct to write "she hadn't heard me" if, at the time when you spoke, she had already not heard you (presumably something you said earlier). It's likely that you mean "I said X, and she did not hear it"; in that case, the tense should be the same for both verbs, since the events happened in the same passage of time, in the order in which they appear in the text.