I'm planning to connect a media server (Raspberry pi may be) to 3 separate home networks (with separate subnets). I've researched and found solutions for 2 networks. If it's possible, how do I go about connecting 3 networks to the server? I can keep the server in one of the networks or in totally separate network. Also, the computers/devices should not be able to access devices from other networks. Devices should have access to devices in its own subnet and the server.
Put a router between the 3 networks. Most routers that aren't bottom-tier are capable of handling multiple networks – be it OpenWRT, a Mikrotik, an ER-X/ER-L, Raspberry Pi, etc.
Each network's existing main router should have a static route for the other two networks, pointing to the 'new' router as the gateway.
Nearly all routers come with firewalls. Edit the firewall rules such that only traffic to your media server is allowed (plus "established" traffic so that replies can go back).
The mechanism doesn't really change much from 2 to higher numbers. (But in all cases, there is the requirement that all networks have unique addresses: you cannot reliably connect two 192.168.1.x/24's together.)