"Do the terms pastor, elder, bishop and overseer refer to the same office or different offices?"
Bishop and overseer both translate the exact same word from the Greek NT--"episkopos." You'll find "bishop" used by English translations from more of the "high church" tradition in Php. 1:1; 1 Tim. 3:1-2; Ti. 1:7 (cf. KJV, ASV, RSV, NKJV, NRSV). In those very same passages, other English versions (particularly those prepared by a predominantly Evangelical committee), you'll find the term "overseer" in place of bishop (cf. ESV, NASB, NCV, NIV, NET).
Do we find in the NT the three terms ["pastor/shepherd" from poimaino, "elder/older" from presbuteros, "overseer" from episkopos] being used interchangeably for the same role in the NT church or for three separate roles? Acts 20:17-28 has Paul sending for the "elders" of the church in Ephesus and telling those elders that the Holy Spirit has made them "overseers" in order to "pastor" (shepherd, care for) the church of God. In 1 Pet. 5:1-2, Peter exhorts his fellow "elders" to "pastor" the flock of God, exercising "oversight" (verb form of episkopos). Titus 1 uses overseer and elder for the same role Paul is describing, a role he uses overseer for in 1 Tim. 3.
An "elder" is who this person is--an older as opposed to younger individual, someone who has gained some practical wisdom through life experience over time.
"Overseer" is what this person is, what it is they do--care for the church, providing guidance, direction, protection.
"Shepherd" is how the this older person is to exercise oversight--like a shepherd with his sheep (see Ezek. 34 and Ps. 23). They are to nurture, nourish, and protect the members of God's flock.
Side bar: notice I have refrained from using the term "office," which is foreign to the text. If we're going to import terminology into the text, I think "function" is superior to "office". Elder/overseer/shepherd is not a string of titles but descriptions for a function within Christ's body the Church. If one is not functioning as an overseer/shepherd, providing that nurturing, nourishment, and protection, then they aren't shepherds. One can have a title and hold an office yet have no function. Not so with elder/overseer/shepherd.
Abotsipatrick asks a second question:
"Does Eph. 4:11...teach that being a pastor is a gift from God that does not require the appointment or ordination of humans?"
No. Yes, it teaches that the roles or functions of apostle, prophet, evangelist, pastor and teacher are gifts from God, just like service, generosity, exhortation, leadership, being merciful are gifts from God (Rom. 12:6-8). It does not necessarily follow, however, that stepping in to the role of an apostle or evangelist or pastor does not require some form or recognition and affirmation of that gift by the Body of Christ through some appointment or ordination by humans.
Did not Paul and Barnabas (two humans) go through the congregations they had planted and appoint elders in each congregation (Ac. 14:23)? Did not Paul, a human, leave Titus, another human, on the isle of Crete to appoint elders in every town as Paul directed him to do (Ti. 1:5)? How was it Timothy became an evangelist? Was it not through Paul's deliberate selection based in part upon the recommendation of the believers from Timothy's home congregation (Ac. 16:1-4), and did it not include the laying on of hands of an eldership (1 Tim. 4:14). Was not Timothy himself, in being given instructions about what to look for in a prospective overseer or deacon (1 Tim. 3) cautioned not to "lay hands" (i.e. commission or ordain) on anyone too hastily (1 Tim. 5:22)? Was not there direct human involvement in the selection of Judas' replacement to the role of apostle? For it began with Peter addressing the need and setting out the parameters for the kind of person they were looking for. The congregation narrowed the field down to two individuals. After that, they asked God to make his choice of the two known through prayer and casting lots (Ac. 1:15-26)? Human involvement working with Divine guidance.
The Lord save the church from self-appointed apostles, prophets, evangelists, pastors and teachers.
Final observation: Somehow, somewhere, we've picked up the notion that having a gift means permission to use that gift in any manner the gifted one seems fit. But a gift is not a license to do as one pleases. Bezalel and Oholiab were divinely gifted by God and filled with God's Spirit "with ability, intelligence, knowledge and craftmanship to devise artistic designs, to work in gold, silver, bronze," etc. in order to construct the tabernacle (Ex. 31; 35:30-36:5). Yet those gifts were only to be used within the boundaries established by God. When God said to use almond blossoms for the menorah, for example, they did not have the artistic license to add or substitute cherry blossoms in the design. Gifted artisans though they were, they were not at liberty to use those God-given gifts to construct an idol, or pornographic sculptures, etc.
Reception of a gift is not permission to then use it in any manner or fashion we please. We must exercise our gifts within the parameters God has established.