Legally, you can construct a full-width single-storey rear extension under Permitted Development rights. From structural consideration, it is perfectly safe for you to position your new foundations right up to the boundary. The Building Control officer will expect to see the excavation at the depth of the existing foundations as a minimum. Ground conditions may warrant excavation much deeper. If you are building up to the boundary, you need to be aware of the provisions of the Party Wall Act.