Unfortunately I don’t think diplomacy allows you to issue warnings – maybe the fact that the AI warns you about your actions is simply the game trying to prove how clever it is (though it gets it wrong a lot of the time too).
It also gives players a clue as to how to build up aggro with an AI – there are situations where it’s better to be declared on, rather than do the declaring yourself and building star bases in or near their area of influence is one of the most effective ways to achieve this.
Anyway I haven’t seen the AI pursue an influence conquest strategy, so I suspect when they build such starbases it’s actually for defensive purposes. As such, unless one of my planets is at risk of flipping, I let the AI waste their resources this way.