Twenty-seven unpainted unit cubes are used to construct a large 3 × 3 × 3 cube.

If five of the six faces of the large cube are then painted, how many of the unit
cubes are painted on exactly two faces?

The large cube is composed of 3 × 3 × 3 = 27 unit cubes.

The total number of unit cubes with exactly 2 faces painted is equal to the number of edge cubes plus the number of corner cubes, which are 12 edge cubes and 8 corner cubes.
Therefore, there are 12 + 8 = <<12+8=20>>20 unit cubes painted on exactly two faces. Answer: \boxed{20}.