We have a shared garden (though technically in the ground plan it's split, so we could legally reinstate the fence). The downstairs flat has until recently been tenanted and they haven't made any effort with the garden or (reasonably) wanted to spend money. We've overhauled it as much as we can, having consulted the tenants and landlord on major stuff like laying artificial lawn. We've paid for all the improvements so far but actually we're the only ones who really use the garden too.
It obviously relies on the neighbours not being dickheads but yep it's perfectly possible to garden a shared garden!
It's worth having a look at ground plans on the flats you are looking at (download from land registry for £4) as you might find there is a delineation that you can enforce if necessary. Or estate agent was clueless on this point.
All gardens I have seen that you could put a garden room in have been split into near the house/near the back fence and had a fence up. The only time there is no fence is usually when the garden is split directly from the house so both parties have a long narrow strip from house to back fence. This is usually as it is too narrow to be of any use to either if a fence is erected so no to a summer house. If I owned the other flat I wouldn't agree to it unless the garden was huge. You need to see the deeds of these flats to make an informed decision.