The NET Bible notes on Genesis 21:30:
The name Beer Sheba (בְּאֵר שָׁבַע, bÿ’er shava’) means “well of the oath” or “well of the seven.” Both the verb “to swear” and the number “seven” have been used throughout the account. Now they are drawn in as part of the explanation of the significance of the name.
Genesis 26:33 actually says that the name Issac gave to the new well he dug was Shibah:
The name Shibah (שִׁבְעָה, shiv’ah) means (or at least sounds like) the word meaning “oath.” The name was a reminder of the oath sworn by Isaac and the Philistines to solidify their treaty.
The simplest solution is that there are two separate accounts that have been fused by a later author to create the current text of Genesis. But that would be an especially careless edit. There seems no reason for the final editor not to simply rephrase the accounts to avoid the contradictory etymologies.
What seems to have happened is that Abraham named his well Beer Sheba and Issac named his Shibah. Both names played off the concept of the oath that was struck between the Philistines and the Hebrews. Issac likely was aware of the similarity between the name he chose and Abraham's choice. Later the name's origin got confused. Even the name's designation blurred as by Genesis 26:33 the name Beer Sheba was associated with the city, not just the wells.
Like other origin stories, it seems likely that the name arose because of several different, reinforcing stories working toward a particular name. The rich associations between "seven" and "oath" that revolve around the two stories recorded in Genesis would have helped firm up the name. Certainly the area would have had other names both before and after Abraham named it, but Beersheba was the name that eventually stuck.
The NET Bible supports this interpretation:
The name Beer Sheba (בְּאֵר שָׁבַע, bÿ’er shava’) means “well of an oath” or “well of seven.” According to Gen 21:31 Abraham gave Beer Sheba its name when he made a treaty with the Philistines. Because of the parallels between this earlier story and the account in 26:26-33, some scholars see chaps. 21 and 26 as two versions (or doublets) of one original story. However, if one takes the text as it stands, it appears that Isaac made a later treaty agreement with the people of the land that was similar to his father’s. Abraham dug a well at the site and named the place Beer Sheba; Isaac dug another well there and named the well Shibah. Later generations then associated the name Beer Sheba with Isaac, even though Abraham gave the place its name at an earlier time.