That makes sense short term for bridge, but is problematic for long term code maintenance. For the basic data type, I would think they should be the same with the only difference would be the serialization operators.
Would it be possible to define a base class with data type, and then a specific derived class that overrides the serialization for ROS1 and ROS2 usage? For internal code, you’d only need to pass the base data type around.
With this model, you could then put the specific derived classes in separate paths for your bridge. Only the top level middleware specific wrapper would need to know about the derived serialization wrappers.