Both the aircraft were designed as replacements for the Lockheed P3C Orion when the P7 was cancelled. While the USN decided to convert a civilian aicraft (as is the norm for most MPA), the Japanese decided to design theirs from scratch (the aircraft was supposed to share a number of items with Kawasaki C2, which given the wildly different mission requirements, didn't go very well). Almost all the differences between the two aircraft, which share a number of similarities resulted from this differing approaches to design.
- The P8 was derived from 737, a commercial airliner, which means that it is optimized for high speed, high altitude flight. Previosly, the MPA were optimised for low altitude operations. The P8, on the other hand has (relatively) highly swept wings with raked wingtips, optimized for high altitude cruise. This means the development of modified operational procedures for this aircraft.

Image from ainonline.com
The P1, on te other hand, is purpose built to be a more or less a one-to-one replacement for the P3C, optimised for low altitude operation with strnthened structure. The wings are swept less and the wing area is relatively more compared to the P8.

Image from battlemachines.files
Operating the aircraft at high altitudes instead of lower ones also means that the operating principles are different. It is the main reason for the P8 not having the Magnetic Anamoly Detector (MAD), which was available in P3C (as well as P1, in the long boom in the tail). Last heard, UAVs are being developed with MADs to overcome this issue.
The P1 has larger windshields (which makes sense, as the crew would be able to scan better for ships at lower altitudes) and more hardpoints compared to the P8.
The P8 has only two engines compared to the four of P1, a significant difference. For aircraft operated in long stretches over areas without airfields, this could be a real issue. While so far no issues have been encountered in this regard, the loss of an engine in a P8 is basically a mission kill, which is not an issue with the P1.
The from-the-scratch development of the P1 alos has enabled the use of fly-by-light controls, which is a first for operational aircraft, allowing for lighter wiring and lesser interference.
One significant advantage of the P8 over P1 is that being based on one of the most successful and widely operated aircraft in history, spares and support will not be a big issue.