A mod p geometric Jacquet-Langlands relation for quaternionic Shimura varieties at ramified primes