How can I predict where my opponent will spawn?

No, the rule of thumb about spawning opposite your opponent does not apply in all cases.

Some maps have what are called 'linked enemy teams' designated in the settings. In these maps, your opponents spawn in a predictable fashion. You can find this information by opening a map in the map editor and going to Map > Team Placement (Advanced).

This list will cover all match-ups. In 2v2 or greater, you can assume that your team always spawns clumped up together. However, on maps I mark as random, such team games will have your clump spawning in different locations each time unless I mention otherwise.

2v2

  • Arid Wastes: N vs S
  • Debris Field: random
  • Delta Quadrant: random
  • Discord IV: NW vs SE
  • High Orbit: N vs S
  • Kulas Ravine: random
  • Lost Temple: random in 1v1, NW vs SE in 2v2
  • Metalopolis: random in 1v1, NW vs SE in 2v2
  • Monlyth Ridge: E vs W
  • New Antioch: random
  • Nightmare: random in 1v1, N vs S in 2v2
  • Red Stone Gulch: E vs W
  • Scorched Haven: E vs W
  • Shakuras Plateau: E vs W
  • Tarsonis Assault: N vs S
  • Terminus: random
  • Twilight Fortress: N vs S
  • War Zone: N vs S

3v3

  • Arkan Citadel: NW vs SE
  • Burning Tide: N vs S
  • Colony 426: N vs S
  • Dig Site: NE vs SW
  • Dirt Side: NE vs SW
  • Frontier: In 1v1, if you start in a corner, your opponent will be in one of the other three corners. If you start in one of the two middle spots, your opponent will be in the other middle spot. E vs W (one player always in the middle) in 2v2, E vs W in 3v3.
  • Monsoon: exact opposite side in 1v1, E vs W in 2v2: one player always in the middle and 3v3
  • Quicksand: exact opposite side in 1v1, S, E, or NE in 2v2, random in 3v3
  • Tectonic Rift: random
  • The Bio Lab: NE vs SW
  • Typhon: NW vs SE
  • Ulaan Deeps: E vs W in 1v1 and 3v3. In 2v2, it's always NE vs SW.

4v4

  • Abyss: random
  • Extinction: NE vs SW. In 2v2, each team spawns in either the two forward bases or the two back bases, and their opponent is in the same spots on the opposite side. In 3v3, the two back spots are always filled with a player.
  • Forbidden Planet: random
  • Lava Flow: N vs S in 1v1 (if either person spawns in the forward position, they're both in the forward position). NE vs SW in 2v2. N vs S in 3v3 (with one person always in the forward position) and 4v4.
  • High Ground: Any other corner but yours in 1v1 and 2v2. N vs S in 3v3 and 4v4.
  • Megaton: NW vs SE in all matchups. In 2v2, each team either spawns in the forward spots or the back spots.
  • Outpost: Any other corner but yours in 1v1. NE vs SW in 2v2 (teammates always on the same rise), 3v3 (middle spots always filled) and 4v4.
  • Sand Canyon: 1v1 is random except that your opponent won't spawn at any base right beside yours on your side (but can still spawn on your side). E vs W in 2v2 (always clumped up, and if you started in the two middle spots, so did your opponent) 3v3 (middle spots always filled) and 4v4.
  • Tempest: random
  • Toxic Slums: Always exactly opposite in 1v1. NE vs SW in 2v2(always beside your ally and immediately opposite the other team) 3v3 (middle spots always filled) and 4v4.
  • Zenith: Random in 1v1, NW vs SE in 2v2 (always next to your ally), in 3v3 (middle spots always filled) and 4v4.

You can often infer the opponent position from subtle clues. Like in metalopolis, if you see an overloard coming at you early, you know the opponent is close. Or if you see an opponent's scouting probe coming from a certain direction, it can be a hint that it's coming from their main base.

In pro-level games, this is probably what you're seeing.