... a hub motor with an input shaft or a motor that could mount in the place of a half shaft...
Okay, it has just dawned on me what might be wanted here...
Is the idea to supplement an existing drivetrain (which includes axle shafts a.k.a. half shafts) with electric motors, with one motor for each wheel, rather than centrally located at the engine output or transmission output?
If that's the case then no, I have not seen a motor set up with one end of its shaft connected to the hub by an axle shaft, and the other connected to the output of a differential; however, it could relatively easily be done, since motors are routinely available with either the shaft sticking out each end or an internal spline on one end.
A challenge is packaging - assuming an independent suspension - since the length of two motors end-to-end plus a differential between them plus the shortest workable axle shaft on each end can easily add up to be too wide to fit between the vehicle's hubs. The solution is "pancake" motors: anything relatively short, but large in diameter to have enough power. Many pancake motors such as the YASA products are axial-flux, but even the HVH motors (from Borg-Warner, previously Remy) are reasonable short and have a very short bearing-to-bearing length. Each motor would need either a splined shaft compatible with insertion into the differential, or an internal spline to accept a stub shaft from the differential.
The bigger challenge is gearing. If the motor shaft is simply connected to the axle shaft, the motor turns at hub (wheel) speed, so it has all of the high-weight and low-torque issues of a direct (no reduction gearing) hub motor... it's just mounted inboard instead of outboard.