Is it unethical to apply to/attend a PhD program knowing you MIGHT end up leaving it under a particular circumstance?
It is not unethical to apply to both programs. 

However, for most advanced degree programs, the possibility of doing multiple programs simultaneously is remote, unless the departments have already established a method for undertaking work between the disciplines. For instance, there may be an interdisciplinary program or a "joint degree" program. In such cases, though, you will find it very difficult to find a funded program that will pay for your studies to complete a degree in another department.