My disclaimer here is that I'm just some homeowner that does my best, not up to speed with code or really even the best way to do much of anything lol.
That said... You can link them with one way flow valves. Draft blockers, damper or whatever they are called in the air flow world - basically check valves that allow air to only flow one way but,
1) codes may not agree
2) you may have issues running both at the same time.
If you're going to do it connect them with a Y rather than a T, and put the dampers on each segment before the Y. Hope that makes sense.
I'd go with separate and definitely take them both out of the attic. Go through attic and roof, or horizontal to a side wall and punch out your siding/brick but don't vent into the attic.
CFM is for how much air you need to move out of the bathroom really. There are formulas for how much you need based on bathroom sq foot size, how long a run you have to make, and how many bends/twists/turns etc the air has to make on its way out.
How many sq feet are the two bathrooms, and how many feet fun does each have to make - straight shot or U turns - would be the info you need to know to find out..