Let's say I have a regular +2 weapon, but I want it to have Flaming Burst, which is a +2 equivalent ability. Could I pay the 10000gp difference to have it be upgraded to a +1 Flaming Burst weapon, or would I have to pay 24000gp to upgrade it to +2 Flaming Burst?
You’ll have to ask your GM. I’m not aware of anything in the rules that says anything one way or the other here. The lack of anything saying you can might indicate that you cannot, however. The wording for everything about modifying existing magic items all focuses on additions and improvements, not downgrades or side-grades.
Consider, too, that the way you figure out how much time crafting takes depends on the value of the work done. If you could do the kind of thing you describe, you could just as well take a +3 weapon and make it a +1 flaming burst weapon for 0 gp. Since it costs 0 gp, it takes 0 days to complete. I think we can all agree that the game doesn’t support swapping the magic on weapons on the fly. That’s a strong case for not allowing it.
On the other hand, though, as a one-time thing, you don’t really end up with an advantage. You end up with a weapon you could have had anyway. And if you had sold your +2 weapon, you would get half its value—but then you would be under your expected wealth by level. You should make up the difference in some future advantures. Which means selling the +2 weapon for 4,000 gp, and spending 14,000 gp on a +1 flaming burst weapon is only a temporary set-back—you should make up the 4,000 gp you’re missing over time.
So I’d be inclined to let you, were it me. I see no reason to punish players for “mistakes” on a long term like this.
But the rules aren’t going to help you there. You’ll have to talk to your GM.
No, per RAW
Pathfinder 1st edition has specific rules about adding new abilities to magical items. Let me quote:
Sometimes, lack of funds or time make it impossible for a magic item crafter to create the desired item from scratch. Fortunately, it is possible to enhance or build upon an existing magic item. Only time, gold, and the various prerequisites required of the new ability to be added to the magic item restrict the type of additional powers one can place.
The cost to add additional abilities to an item is the same as if the item was not magical, less the value of the original item. Thus, a +1 longsword can be made into a +2 vorpal longsword, with the cost to create it being equal to that of a +2 vorpal sword minus the cost of a +1 longsword.
Note that there is no mention of either removing or replacing an ability (in your case, replacing the +2 enhancement with a +1 enhancement), so it's not possible per RAW.
The "Altering Existing Magic Items" section of Ultimate Campaign is also interesting:
The standard rules don’t allow item creation feats to alter the physical nature of an item, its default size, its shape, or its magical properties. For example, there is no mechanism for using crafting feats to change a steel +1 longsword into an adamantine +1 longsword , a Large +1 chain shirt into a Medium +1 chain shirt , boots of speed into an amulet of speed, or a +1 unholy longsword into a +1 flaming shock longsword. Many GMs might decide that these kinds of transformations are impossible, beyond the scope of mortals, or not as cost-efficient as crafting a new item from scratch. Others might allow these sorts of transformations for free or a small surcharge. Keep in mind the following warnings.
Note that RAW lets the GM to allow changing the base item, but once again there is no mention of removing abilities from a magical item.
As usual, the GM has the last word and might rule against the gap in RAW, allowing the either remove the ability from the item, or to destroy the initial item during the construction of the second item to save costs.