On the Axiom of Extensionality, Part I by Robin Gandy, 1959, contains a readable explanation of how to interpret the axiom of extensionality for Church’s higher-order logic. This is connected to the notion of logical relation in typed lambda calculus.