Hey, imagine that I have in my routing table routes to a same destination:
a) iBGP (via a network /24) and OSPF destination via a /27 network address;
Given the administrative distance that for iBGP is 200, is the OSPF (adm distance=110) the preferred one in this case?
Longest prefix will dictate the preferred route, not the administrative distance.
Based on your example, if you were to send:
192.168.1.0/27 via OSPF
192.168.1.0/24 via BGP
You will prefer to reach hosts from 192.168.1.1-31 via OSPF and 192.168.1.32-254 via BGP.