When you configure dhcp pool you configure network and the subinterfaces represent different networks so the router is not that stupid to give out address to host on a network where that address with that subnet mask would be wrong. For example you have 3 networks on subinterfaces fa0.1 fa0.2 fa0.3 each subinterface is a different network with different address and router knows which network is on which subinterface.