Burnt wires are usually the result of a loose connection. When a connection is not solid, wires can heat up. This can be an even bigger problem with high amperage devices (heater, stoves, etc.). This likely has been an issue for a long time, and finally reached the breaking point.
The problem with overheating wires, is that the issue becomes compounded over time. Through constant heating/cooling cycles, the connection can become looser, the wire can become brittle, and the resistance in the wire can be increased. The more the resistance of the wire increases, the hotter the wire gets. Eventually, the wire can get hot enough to burn off the insulation. When it gets to this point you hope the wire breaks causing a short (which will trip the breaker), or at least breaking the circuit so current can no longer flow. If the wire does not break, you could be in much bigger trouble if the wire gets hot enough to start a fire.
The fact that the ground is burnt, is concerning. Typically the ground should not be carrying current, and so should not be heating up. You'll want to check the heater for a ground fault, to figure out why current is flowing in the ground. Check to make sure the bare ground wires behind the thermostat are pushed to the back of the box, to prevent them from touching the bare terminals on the thermostat.
My advice to you, would be to contact a local licensed electrician. It's difficult to accurately diagnose issues like this, through the internet. An electrician will be able to explain the cause to you, and tell you what the options are to remedy this problem.
10 gauge wire is the largest I like to use in home use. Depending on who you talk to and what code book you are looking at, the amount of current a 10 gauge wire can handle changes. I tend to think it can safely handle about a 30 amp breaker (and I think most code books fall in line with this).
You can add up the amps (12+15=27 amps) to get the total amps possible. This would mean that a 30 amp breaker with 10 gauge wire should work fine. However, check your currents to make sure that is the max that will be pulled. Many items have a large start up current that can cause a breaker to trip if you aren't careful.
For things that pull this much current by themselves, it is generally better to split them into 2 different breakers. So for you I would go with a 15 amp and a 20 amp. Technically you can use #14 on the 15 amp breaker, but if it were me I would go ahead and run #12 in case you some day want to swap out your fireplace with something that pulls more power.
Best Answer
Using the values from Chapter 9 Table 8 of the National Electrical Code, you can calculate the maximum circuit distance as follows.
Find allowable voltage drop
The NEC recommends a maximum 3% voltage drop at the "farthest outlet of power, heating, and lighting loads, or combinations of such loads" (210.19(A) FPN No. 4). So you'll want to start by calculating the maximum voltage drop as follows:
Max Voltage Drop = Voltage * 3%
Max Voltage Drop = 240V * 0.03
Max Voltage Drop = 7.2V
Calculate the maximum length
To calculate the maximum length of the circuit, you'll first have to know how much resistance the conductor being used has. Table 8 from Chapter 9 of the NEC, makes this simple. If you're using 12 AWG solid uncoated copper, you'll find that it has a resistance of 1.93 ohms per thousand feet.
For the following formula, you'll need to know the resistance per foot. This is easily calculated, by dividing the value above by 1000.
1.93 ohms per 1000 feet / 1000 = 0.00193 ohms per foot
Next you'll need to know the amount of current flowing along the conductor. Since you didn't specify this in the question, I'll use 20 amperes as an example.
The formula
Length = maximum voltage drop / ( 2 * Ohms per foot * current)
Length = 7.2 V / ( 2 * 0.00193 Ohms * 20 Amperes)
Length = 7.2 / ( 0.00386 * 20)
Length = 7.2 / 0.0772
Length = 93.264248704663212435233160621762 ft.
tl;dr
If you have a circuit with 20 amperes of current flowing along a 12 AWG uncoated solid copper conductor, and you want to keep the voltage drop below 7.2 V (3% or 240 V). You'll want to keep the length of the circuit (one way) less than 93' 4". Unless may calculations are wrong (which they sure could be).
NOTE:
Since you didn't mention the actual current drawn by the heater. The above calculations are for example purposes only.
Using Ohm's law, you can figure out the current based on the wattage you've stated.
I = P / V
I = 2000 watts / 240 volts
I = 8.33333 amperes
You can then plug this into the formula above.
Length = 7.2 Volts / ( 2 * 0.00193 Ohms * 8.33333 Amperes )
Length = 7.2 / ( 0.00386 * 8.333333 )
Length = 7.2 / 0.0321666666666667
Length = 223.8341968911917 ft.