If the gap is small enough - and nobody places a colony to drive a wedge into it - it should close eventually.
When there are worlds from different empires, both in border range of some other point of interest, they seem to split the difference between them based on what I think of as "border pressure". The things that make your border larger also move the boundary lines a bit closer to the other empire, even when that's inside your maximum unopposed border range and the border is stable. So the effect of such wedges will vary depending on your development of social border techs and world pop.
Your established borders can also creep into rival territory over time if you out-develop them (or vice versa), so it's possible that systems near the border will automatically change hands without a war.
I find outposts very expensive in terms of influence -- the maintenance cost is higher than it looks, and cuts into your ability to build actual colonies -- and so am usually pretty picky about where I place them, usually only having one or two max. Deleting the enemy outposts is also one of my first orders of business after winning a war and taking systems or integrating a vassal. They're also valuable targets during a war, as you can deprive the enemy of a lot of orbital stations with one blow if they were depending on outposts rather than colonies to fill in gaps.