The NHS in Wales has been underfunded compared with the health service in England, the assembly government admits.