For example, lets say we design a plane with the same lengh as the A340-600, but has the width of an embraer erj-140. Assuming everything works, what problems would we run into in regards to aerodynamics?
The question reminds me of the DC-8 Super 61. I always found its fuselage to be absurdly long (picture below, source).
First of all, your volume to surface ratio will suffer. A more slender fuselage will have proportionally more surface area for the same volume than a more stubby one. The first aerodynamic effect, thus, is a higher friction drag relative to fuselage capacity. Below a fineness ratio of five, increasing flow separation will unduly increase drag. Moving from an A340-style fuselage to something more slender, however, will not affect separation.
While volume would need to be held constant in case of airships, the goal for an airliner should be to maintain seating capacity, which can be assumed to be proportional to floor space (within limits - aisle height should not drop below 6 ft). Therefore, the figure of merit should be volume$^⅔$, and the growth in skin friction drag (and structural weight) should be less severe with increasing slenderness of the fuselage. Also, with a longer tail the tail surfaces can be made proportionally smaller, which reduces friction drag a bit, too.
The graph below is from S. Hoerner's Fluid Dynamic Drag, figure 24 of chapter 13, and actually valid for flying boat fuselages. It shows nicely how the drag coefficient grows with increasing fineness ratio; however, since the drag coefficient is based on frontal area, this is slightly misleading.
Hoerner's comments to this graph include an optimum based on volume$^⅔$:
The optimum ratio with respect to drag on frontal area, seems to be in the vicinity of 5. Based on (volume)⅔, a minimum drag coefficient is obtained at l/"d" ≈ 9, corresponding to l/b ≈ 15 in the hull family tested
Maximum Cruise Speed
When being operated at speeds approaching Mach 1, the more slender fuselage will show a higher value of the drag divergence Mach number, so the second aerodynamic effect of a more slender aircraft is a slightly higher cruise speed, wing aerodynamics permitting.
Again, a graph from Hoerner's Fluid Dynamic Drag (figure 37 of chapter 15) as proof:
Third, since the fuselage length will determine the lever arm of the empennage, a more slender fuselage of the same capacity will exhibit a higher pitch damping relative to its static stability. Pitch damping depends on the square of the tail's lever arm while static stability grows only linearly. Note that the tail size needed for the same stability and pitch authority will change inversely to fuselage length, offsetting some of the increase in zero-lift drag of the longer fuselage.
Take-Off and Landing Speed
If the landing gear remains unchanged, a fourth effect could be a lower rotation angle on take-off and pitch attitude on landing in order to avoid a tail strike. This might result in higher take-off and landing speeds.
This answer would be much longer if aeroelastic and structural considerations would be included. I restricted it to aerodynamic factors as requested.
Aerodynamically there would not be much of a problem. Maybe aeroelastically, because of the thin tube bending when elevator and rudder inputs are generated. But there are definitely structural problems.
When flying, the wings support the aircraft and the fuselage hangs off of them. A long, thin tube wants to bend down at the ends: tension at the top of the tube, compression at the bottom. The more distance between top and bottom, the lower the stresses and strains are and the lighter the construction - but our long thin tube has relatively little distance and we're creating a heavy and flexing construction.
There is a study on the resistance of the pipe (=fuselage in this case) to bending forces, as a function of the diameter and wall thickness.
From this study seems that larger diameter (given the same wall thickness) makes the pipe more resistant to bending. Also, when such a pipe finally bends, it is more likely just to buckle rather than failing catastrophically at the single point.
This probably explains why bigger airliners are made wider and higher (two levels) rather than just longer.