The rules changed over time across Legends and Canon
Originally, as you mention, Legends continuity established that hyperspace travel explicitly couldn't happen within a planet's gravity well. This was ingrained in Legends canon at least as early as 1991, where it forms the basis for a couple of plot points in the Thrawn Trilogy:
Han cut himself back into the radio circuit. "—said that if I had a slave circuit they could get me in a lot faster," Luke was saying. "A hyperspace jump as close to Nkllon as the gravity well will permit, then just a few minutes of cover before I'd be in the planetary umbra and could go the rest of the way in on my own."
Heir to the Empire: The 20th Anniversary Edition, page 165-166 of Kindle edition
This was still the rule as of 2007, judging from a later Timothy Zahn book:
One glance at the half dozen mismatched ships rising behind them was all he needed. "Pirates," he snapped to the others, throwing power to the engines and angling the ship upward. Facing pirates deep inside a planet's gravity well, with no cover and no chance of quick escape to hyperspace, was about the worst situation a pilot could encounter.
Allegiance, as excerpted in Heir to the Empire: The 20th Anniversary Edition
The ability to pull ships out of hyperspace and prevent them from re-entering it is also the point of the EU's Interdictor cruiser, as mentioned in the question:
During large space engagements, escape into hyperspace is often the last recourse for wounded starships. However, the Empire removed this tactic from the Rebel Alliance protocols by creating the formidable Interdictor cruiser. The Interdictor has four gravity-well projectors that can mimic a mass in space, thereby interrupting hyperspace travel. Nearby vessels are automatically prevented from engaging hyperdrive engines, and any starships passing through the area via hyperspace are suddenly forced into realspace.
The New Essential Guide to Vehicles and Vessels, page 69: Interdictor Cruiser
While this description's use of "automatically" leaves open the possibility that this is just a safety measure on ships' hyperdrives, presumably the Alliance would have been able to tactically override their ships' safety measures to counteract the effectiveness of Interdictors if that was the only restriction.
However, The Clone Wars series a couple of years later would come to ignore many of the "rules" that had been established by the Expanded Universe, including the properties of hyperspace—see also "Are there any Star Wars Canon usage of 'Hyperdrive Radio' prior to Rogue One?" The 2009 episode "Jedi Crash" includes a hyperspace jump within a planet's atmosphere, leading to an implicit retcon that jumping to hyperspace from a planet wasn't impossible, just dangerous—see "How did this ship jump to lightspeed within a gravity well?" Since the show was (mostly) released before Disney's acquisition of Lucasfilm, these events also became part of Legends continuity and overwrote the earlier categorical ban on in-gravity hyperspace.
In the specific case of The Force Awakens and jumping that close to a planet, this definitely seems like it would have been impossible under the Heir to the Empire rules (where it would have taken "minutes" to reach the planetary umbra, let alone the atmosphere, compared to the seconds it takes in The Force Awakens to get from the exit point to literally hitting the ground). However, it's less clear what was possible to do with hyperspace in Legends after The Clone Wars aired.