Thinking about McLarens lack of ability to develop their way out of their problems and the penalties they are picking up the though struck me that, rather than tackling budgets and tech regs to keep the sport competitive why not use sporting regs?
For example you could tie in-season test mileage with constructors points so the top three have a certain testing limit then the next three are given more mileage, the next three more again etc, this could be re-assessed (and allotted) on a quarterly basis. That means a team like Mclaren having big problems can get lots of test mileage to close the gap quickly without allowing Mercedes and Ferrari to pull away at the front, it would also allow new manufacturers to catch up quickly thus making the sport more attractive to them.
On the penalty front, simply impose a simple place drop for an engine/gearbox change, if you're at the front you lose 5 places if you're at the back you lose nothing. This means the smaller teams have the luxury of running more engines without substantial qually losses so they can turn the wick up on them and help themselves to run a hotter pace. However, once they start getting furter up the grid in qually the penalty for changes begins to hurt more and the incentive to turn up the engines and change then frequently drains away.
That way you avoid budget caps and two tier tech regs but still balance the financial disadvantages out, obviously the TV money stil needs to be addressed though.