Like with a lot of tropes, it's a case by case basis. In some cases, long flashbacks can be excused if focused on thoroughly exploring characters or in stories that start in media raes. The Golden Age Arc of Berserk is gold in more than name for this with it essentially being an incredibly long flashback/prequel with it masterfully exploring its central characters and foreshadowing many later events as well as being an excellent story all on its own. However, this type of storytelling is very risky as such long flashbacks require interesting and fleshed out characters to work. In cases where an author isn't confident in exploring characters' history through a long story arc, something more akin to how George R.R. Martin uses flashbacks in A Song of Ice and Fire is preferable with each one being short and concise enough to be easy to digest and build a coherent character history when pieced together.
For more general flashbacks, an important aspect is to use them more for characterisation than the stimulus of character development. It's fine to show how past events impacted a character's outlook, but it's cheap and overly simplistic if used to portray a defining event as the root cause for their personality. One Piece is a series that abuses this aspect to the point it gets stale fast with how each of the Straw Hats' flashbacks boil their character traits down to one traumatic event and the flashbacks in general tend to make it too obvious if a character will join the crew. Meanwhile, something such as the Trust and Betrayal arc of Rurouni Kenshin does this well as, despite boiling down Kenshin's outlook to one tragic event, it works well due his three-dimensional characterisation within the main story as well as showing a gradual change over him rather than it causing him to pull a 180.
Perhaps the worst way a flashback can be used is to cheaply flesh out a character just before their death that had little time to be explored prior. Something like Bleach is heavily guilty of this (mainly due to how lacking in characterisation its cast is) with things such as Tosen or Gin's motivations being quickly infodumped through a flashback before their deaths. If a character is explored well before their death, however, having a flashback end their arc isn't so bad. For instance, Pakunoda from Hunter X Hunter is explored well enough that her death occurring not long after a short flashback of the Troupe's beginnings was well done. A less conventional case would be with Shin from Hokuto no Ken. He initially seems like a one-dimensional villain whose given some sympathy points through a flashback before his death, yet it works as not only does the flashback line up with his motivations, but later character reveals and flashbacks allow for him to have a coherent character arc that's told in reverse order of the norm.
Tl;dr, as long as the creator has a good enough grasp on the character and how much of a display of past events is necessary, they can allow for the flashback to feel necessary.