Dire here is the reporting verb introducing indirect speech. Whether you consider the speaker is expressing a judgement in their words is irrelevant here, grammatically the speaker is reporting their thoughts.
- Je me suis dis/J'ai pensé : « il vaut mieux se rendre chez elle ».
Indirect speech :
- Je me suis dit/J'ai pensé qu'il valait mieux se rendre chez elle.
Since the reporting verb is in the passé composé and considering the action in the dependent clause is over, the verb in the dependent clause is in the imparfait. There are lots of questions about indirect speech on French Language, you can see them here.
We cannot have the subjunctive after dire when in the affirmative because it expresses something that is real. We could have the subjunctive with dire in the negative:
- Je ne dis pas que ce ne soit pas la meilleure solution possible.
because in this sentence dire does not express something that is for certain. The indicative could also be possible according to what we mean to convey. See the answer to this question.
There are other verbs that work like that: affirmer, penser, croire, espérer ....