That is money being thrown into the pit by design. Let me explain. Every planet in your empire has a certain base production budget granted to it based upon several factors like PQ, population, and the spending capacity of your economy. There are more, but those are the important ones for this explanation. Let's say that a new found PQ 15 colony with a small population is granted a 9 BC budget. Those points are then divided into military, social, and research points. Let's also say that the spending ratios are equal so each category gets a third. This means that the planet will produce 3 military points, 3 social points, and 3 research points. Even if you build no ships, the 3 BC military budget gets spent. Even if you build no buildings, the 3 BC social project budget gets spent. And the 3 BC research budget is always being spent on research, of course. This is what is costing the extra money.
Now, what you do about this waste can vary. Building a warship might keep the military money from being wasted on no project at all, but will the ongoing costs of maintaining the ship break you budget and do you need the military power? Building a constructor might be better. No upkeep for them and starbases always need to be made and added to. You can build a social project just to build something to fill the blank project slot to stop from wasting that money, but once again, will the upkeep costs be worth it and is there really a need for that building? You could micromanage a bit and build currently unneeded social projects almost to completion and then switch to something else to give you a building that can be completed very quickly if the need arises for that building, or you can just leave the project blank and just write off the loss.