The bill paves the way for major military and domestic program spending hikes that critics say will swell the deficit.